Block the undo shortcut while dragging with a tool (#1675)

Add NOOP message and bind it to CTRL + Z + LMB
This commit is contained in:
milan-sedivy
2024-03-11 16:03:08 -07:00
committed by GitHub
parent 01da53eba0
commit c3a886116a
4 changed files with 7 additions and 0 deletions
@@ -48,6 +48,8 @@ pub fn default_mapping() -> Mapping {
// NORMAL PRIORITY
// ===============
//
// Hack to prevent LMB + CTRL (OPTION) + Z combo (this effectively blocks you from making a double undo with AbortTransaction)
entry!(KeyDown(KeyZ); modifiers=[Accel, Lmb], action_dispatch=DocumentMessage::Noop),
// NodeGraphMessage
entry!(KeyDown(Delete); modifiers=[Accel], action_dispatch=NodeGraphMessage::DeleteSelectedNodes { reconnect: false }),
entry!(KeyDown(Backspace); modifiers=[Accel], action_dispatch=NodeGraphMessage::DeleteSelectedNodes { reconnect: false }),