Live preview: show a tool at once, and OK takes the preview's result (#1020)
The live preview of a join, cut or intersect now sends the tool body's scene as soon as the tool is built, then runs the feature for its error while the dialog keeps its spinner. OK pressed while the preview is still computing the same commands waits for it instead of computing the feature a second time on the UI thread; the session shares its evaluation cache with the preview's scratch copy.
This commit is contained in:
1 parent
14d928b2c8
commit
f2d7b220f7
2 files changed
+143
-19
No files matched your search
@@ -2981,6 +2981,8 @@ fn sels(d: &Dialog, i: usize) -> &[Sel] {
|
||||
|
||||
fn run_dialog(app: &mut SolveApp, d: &Dialog) -> Result<(), String> {
|
||||
let commands = apply_commands(app, d)?;
|
||||
// The live preview may be computing these very commands: OK takes its result.
|
||||
crate::preview::settle(app, &commands);
|
||||
if let Some((_, marker)) = d.editing {
|
||||
// Record the actual pre-edit timeline state in the command's undo snapshot.
|
||||
roll_marker(app, marker)?;
|
||||
|
||||
Reference in new issue
Block a user