mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
add notebooknodeexplorer shortcut cut (#2100)
This commit is contained in:
parent
cf0146050e
commit
dfa4e59737
@ -71,6 +71,7 @@ namespace vnotex
|
|||||||
UnitedEntry,
|
UnitedEntry,
|
||||||
Copy,
|
Copy,
|
||||||
Paste,
|
Paste,
|
||||||
|
Cut,
|
||||||
Properties,
|
Properties,
|
||||||
Global_WakeUp,
|
Global_WakeUp,
|
||||||
MaxShortcut
|
MaxShortcut
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
"OpenLastClosedFile" : "Ctrl+Shift+T",
|
"OpenLastClosedFile" : "Ctrl+Shift+T",
|
||||||
"UnitedEntry" : "Ctrl+G, G",
|
"UnitedEntry" : "Ctrl+G, G",
|
||||||
"Copy" : "Ctrl+C",
|
"Copy" : "Ctrl+C",
|
||||||
|
"Cut" : "Ctrl+X",
|
||||||
"Paste" : "Ctrl+V",
|
"Paste" : "Ctrl+V",
|
||||||
"Properties" : "F2",
|
"Properties" : "F2",
|
||||||
"Global_WakeUp" : "Ctrl+Alt+U"
|
"Global_WakeUp" : "Ctrl+Alt+U"
|
||||||
|
@ -1173,6 +1173,7 @@ QAction *NotebookNodeExplorer::createAction(Action p_act, QObject *p_parent, boo
|
|||||||
this, [this, p_master]() {
|
this, [this, p_master]() {
|
||||||
copySelectedNodes(true, p_master);
|
copySelectedNodes(true, p_master);
|
||||||
});
|
});
|
||||||
|
WidgetUtils::addActionShortcutText(act, coreConfig.getShortcut(CoreConfig::Cut));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Action::Paste:
|
case Action::Paste:
|
||||||
@ -2186,6 +2187,17 @@ void NotebookNodeExplorer::setupShortcuts()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cut
|
||||||
|
{
|
||||||
|
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Cut), this);
|
||||||
|
if (shortcut) {
|
||||||
|
connect(shortcut, &QShortcut::activated,
|
||||||
|
this, [this]() {
|
||||||
|
copySelectedNodes(true, isActionFromMaster());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Paste
|
// Paste
|
||||||
{
|
{
|
||||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Paste), this);
|
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Paste), this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user