Repository navigation
Guides: Lock Guides keeps guides deselected after Undo, Exit Isolation Mode and Paste - #2629
Merged
bflatastic merged 1 commit intoOct 17, 2026
Conversation
4 tasks done
…n Mode and Paste With View > Guides > Lock Guides on, Session::select drops the paths made into guides from the selection (storytold#1534), but commands that set the selection another way skipped that filter and left a locked guide selected, so the next move moved it. object.exitIsolation selected an isolated guide path. Undo, Redo, a canceled undo group, a canceled drag or dialog preview and a failed command.batch brought back locked guide paths and ruler guides in the selection. Unlock All, Show All and Paste selected the guide paths they unlocked, showed or pasted. Locking the guides deselected them in the active document only. The filter is now deselect_guides, which also clears the selected ruler guides. Session::select and Session::edit run it while Lock Guides is on, and so do object.exitIsolation, Undo, Redo, Session::cancel_interaction, a canceled undo group and a failed batch. Locking the guides deselects them in every open document. With Lock Guides off, the selection is set as before. Docs: docs/mcp.md.
bflatastic
force-pushed
the
fix/exit-isolation-keeps-lock-guides
branch
from
October 17, 2026 10:16
3e8832d to
30c5bd3
Compare
Member
|
Thanks @dotCooCoo, merged. It went through the full gate (fmt, clippy, tests, layers, wasm) in a batch with the other PRs landed today. |
This was referenced Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
With View › Guides › Lock Guides on,
Session::selectdrops the paths made into guides from the selection (#1534),but commands that set the selection another way skipped that filter and left a locked guide selected, so the next
move moved it. On
main, with Lock Guides on,object.exitIsolationafterobject.isolate {id}on a guide pathselects the guide, and
object.movethen moves it. Undo, Redo, a canceled undo group, a canceled drag or dialogpreview and a failed
command.batchbrought back locked guide paths and ruler guides in the selection. Unlock All,Show All and Paste selected the guide paths they unlocked, showed or pasted. Locking the guides deselected them in the
active document only.
The filter is now
deselect_guidesincrates/engine/src/lib.rs, which also clears the selected ruler guides.Session::selectandSession::editrun it while Lock Guides is on, and so doobject.exitIsolation, Undo, Redo,Session::cancel_interaction, a canceled undo group and a failed batch. Locking the guides deselects them in everyopen document. With Lock Guides off, the selection is set as before. The params text of
view.guides.lockand theguides paragraph of
docs/mcp.mddescribe this.How it was tested
tests_menucmds::exit_isolation_leaves_a_locked_guide_path_deselected: nothing is selected and a move leaves theguide in place; with Lock Guides off the guide is selected.
tests_menucmds::undo_and_redo_leave_locked_guides_deselected: a guide path and a ruler guide stay deselected andin place.
tests_menucmds::unlock_all_show_all_and_paste_leave_locked_guide_paths_deselectedtests_menucmds::lock_guides_deselects_the_guides_of_every_open_documenttests_menucmds::a_failed_batch_and_a_canceled_undo_group_leave_locked_guides_deselectedtests_menucmds::a_canceled_interaction_leaves_locked_guides_deselectedEach test fails with its part of the change taken out. Targeted checks: clippy,
cargo fmt, the engine library(2,254 passed), and
cargo xtask brands,layersandassets.On Windows 11 (x86-64) with rustc 1.99.0, on top of
mainat 8bc6532:CRAFT_FONTS_DIR=<craft-fonts checkout> cargo xtask cipasses its 9 steps: 7,370 tests passed, 0 failed, 11 ignored.git merge-treereports no conflicts withmainat 8bc6532. With #2592,exit_isolation,Session::edit, Undo, Redoand the canceled undo group conflict: keep both, with
deselect_guidesbefore #2592'sprotect_locked_artboardsorsync_new_artcall. With #1987, keep itspub(crate) fn exit_isolation; with #1281, calldeselect_guidesafter itsprune_found.Checklist
cargo xtask cipasses (fmt, clippy, tests, assets, brands, layers, wasm).unwrap(),expect(),panic!,unreachable!,todo!orunimplemented!outside tests, and no unchecked indexing on data from files, parameters ormessages. Errors are returned as
Resultand shown to the user(why and how).
ASSETS.md.