diff --git a/src/core/coreconfig.h b/src/core/coreconfig.h index 1f40720d..61b0e110 100644 --- a/src/core/coreconfig.h +++ b/src/core/coreconfig.h @@ -71,6 +71,7 @@ namespace vnotex UnitedEntry, Copy, Paste, + Cut, Properties, Global_WakeUp, MaxShortcut diff --git a/src/data/core/vnotex.json b/src/data/core/vnotex.json index e53cd52d..06a1e7e2 100644 --- a/src/data/core/vnotex.json +++ b/src/data/core/vnotex.json @@ -62,6 +62,7 @@ "OpenLastClosedFile" : "Ctrl+Shift+T", "UnitedEntry" : "Ctrl+G, G", "Copy" : "Ctrl+C", + "Cut" : "Ctrl+X", "Paste" : "Ctrl+V", "Properties" : "F2", "Global_WakeUp" : "Ctrl+Alt+U" diff --git a/src/widgets/notebooknodeexplorer.cpp b/src/widgets/notebooknodeexplorer.cpp index 688d40ca..1bbecf5b 100644 --- a/src/widgets/notebooknodeexplorer.cpp +++ b/src/widgets/notebooknodeexplorer.cpp @@ -1173,6 +1173,7 @@ QAction *NotebookNodeExplorer::createAction(Action p_act, QObject *p_parent, boo this, [this, p_master]() { copySelectedNodes(true, p_master); }); + WidgetUtils::addActionShortcutText(act, coreConfig.getShortcut(CoreConfig::Cut)); break; 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 { auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Paste), this);