mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-29 01:34:29 +01:00
3D: take main's OK fix instead of this branch's
#9970 fixed the 3D dialogs' OK on main by ending the running preview before the values run again. This takes out this branch's earlier fix (LivePreview::rerun_next) so the two do not overlap.
This commit is contained in:
1 parent
25560e9259
commit
e508073632
2 files changed
+2
-9
No files matched your search
@@ -94,12 +94,6 @@ impl LivePreview {
|
||||
Some(answer)
|
||||
}
|
||||
|
||||
/// Forgets the values last previewed and keeps the interaction they ran in, so the next [`Self::run`] previews
|
||||
/// them again inside that interaction and returns the command's answer, a refusal included.
|
||||
pub(crate) fn rerun_next(&mut self) {
|
||||
self.previewed = None;
|
||||
}
|
||||
|
||||
/// OK: keeps the previewed `cmd` as one undo step, or, when its preview is not running, keeps typing in progress
|
||||
/// and runs `cmd` as a step of its own; the command's warning, or a plug-in run's notice, shows in the status bar
|
||||
/// either way. Another edit in progress is left as it is and OK is refused. On an error the dialog stays open.
|
||||
|
||||
@@ -254,9 +254,8 @@ fn ok(app: &mut VectorcraftApp, answer: &ParamResult) -> Result<(), String> {
|
||||
return Err(why);
|
||||
}
|
||||
let (cmd, p, _) = s.request(&answer.fields);
|
||||
// OK must validate afresh: the live preview also caches refused requests. The preview keeps its interaction, so
|
||||
// the values run again inside it and the commit below keeps that interaction as the undo step.
|
||||
s.preview.rerun_next();
|
||||
// OK must validate afresh: the live preview also caches refused requests.
|
||||
s.preview = LivePreview::default();
|
||||
match s.run_preview(app, cmd, &p) {
|
||||
Some(Ok(())) if finish_unchanged_preview(app) => return Ok(()),
|
||||
Some(Err(why)) => {
|
||||
|
||||
Reference in new issue
Block a user