mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-18 18:38:05 +08:00
@@ -1204,7 +1204,7 @@ impl MessageHandler<DocumentMessage, (&InputPreprocessorMessageHandler, &FontCac
|
||||
.into(),
|
||||
);
|
||||
|
||||
let mouse = mouse.map_or(ipp.mouse.position, |pos| pos.into());
|
||||
let mouse = mouse.map_or(ipp.viewport_bounds.center(), |pos| pos.into());
|
||||
let transform = DAffine2::from_translation(mouse - ipp.viewport_bounds.top_left).to_cols_array();
|
||||
responses.push_back(DocumentOperation::SetLayerTransformInViewport { path, transform }.into());
|
||||
}
|
||||
|
||||
@@ -176,8 +176,13 @@ impl PropertyHolder for MenuBarMessageHandler {
|
||||
action: MenuEntry::create_action(|_| PortfolioMessage::Copy { clipboard: Clipboard::Device }.into()),
|
||||
..MenuEntry::default()
|
||||
},
|
||||
// TODO: Fix this
|
||||
// { label: "Paste", icon: "Paste", shortcut: ["KeyControl", "KeyV"], action: async (): Promise<void> => editor.instance.paste() },
|
||||
MenuEntry {
|
||||
label: "Paste".into(),
|
||||
icon: Some("Paste".into()),
|
||||
shortcut: Some(vec![Key::KeyControl, Key::KeyV]),
|
||||
action: MenuEntry::create_action(|_| FrontendMessage::TriggerPaste.into()),
|
||||
..MenuEntry::default()
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user