mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-02 13:08:12 +08:00
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:
@@ -15,6 +15,7 @@ use serde::{Deserialize, Serialize};
|
||||
#[impl_message(Message, PortfolioMessage, Document)]
|
||||
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize)]
|
||||
pub enum DocumentMessage {
|
||||
Noop,
|
||||
// Sub-messages
|
||||
#[child]
|
||||
Navigation(NavigationMessage),
|
||||
|
||||
@@ -892,6 +892,7 @@ impl MessageHandler<DocumentMessage, DocumentInputs<'_>> for DocumentMessageHand
|
||||
responses.add(NavigationMessage::FitViewportToBounds { bounds, prevent_zoom_past_100: true });
|
||||
}
|
||||
}
|
||||
Noop => (),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1522,6 +1523,7 @@ impl DocumentMessageHandler {
|
||||
|
||||
pub fn actions_with_graph_open(&self) -> ActionList {
|
||||
let mut common = actions!(DocumentMessageDiscriminant;
|
||||
Noop,
|
||||
Undo,
|
||||
Redo,
|
||||
SelectAllLayers,
|
||||
|
||||
Reference in New Issue
Block a user