Repository navigation
Set a shortcut mode from where the focus is, so two panels of one mode don't undo each other - #335
Merged
Merged
Conversation
…e don't undo each other A NodeView or VirtualTable set the app's one command mode while it was built: its own when it had the focus, else Default when the mode was its own. Two of them with one mode (two NodeView or two Hierarchy panels) undid each other when both were built in one frame, as after an edit in either: the focused one's shortcuts (F, Delete, Ctrl+G) stopped working, or the mode flipped twice a frame and cancelled a chord. - ClaimCommandMode(owner, mode): a control records its mode as it's built. The mode is set once a frame, before input is handled, from the claim the focus is within; Default once it's in none, unless the app set a mode of its own since. Claims no longer built drop out once the focus isn't in them. - NodeView and VirtualTable claim their modes instead of setting them. - Docs: two tables of one mode, and ClaimCommandMode, in the tables guide. - Tests: two node views of one mode keep the focused one's mode, whichever is built first.
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.
A
NodeVieworVirtualTablewith acommandModeset the app's one command mode while it was built:Two of them with one mode, such as two NodeView or two Hierarchy panels, undid each other whenever both were built in the same frame. That happens after any edit in either panel, since
onChangedrebuilds the other.What was wrong
What changes
ClaimCommandMode(owner, mode): a control records its mode as it's built, and doesn't set anything itself.NodeViewandVirtualTableclaim their modes instead of setting them. An app's own control can do the same.ClaimCommandMode, and the changelog has an entry.Tests
Validation
gui_core_tests,gui_vulkan_tests,gui_gpu_tests,gui_d3d12_testsandgui_sdlgpu_testsall pass on Windows.--benchrun reports no errors.