mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-04 21:39:52 +08:00
fix shortcuts
This commit is contained in:
parent
d33b539659
commit
8678468998
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,3 +3,6 @@
|
||||
.ccls
|
||||
compile_commands.json
|
||||
compile_flags.txt
|
||||
.cache
|
||||
.tasks
|
||||
.vimspector.json
|
||||
|
@ -2169,7 +2169,9 @@ void NotebookNodeExplorer::setupShortcuts()
|
||||
|
||||
// OpenWithDefaultProgram.
|
||||
{
|
||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::OpenWithDefaultProgram), this);
|
||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::OpenWithDefaultProgram),
|
||||
this,
|
||||
Qt::WidgetWithChildrenShortcut);
|
||||
if (shortcut) {
|
||||
connect(shortcut, &QShortcut::activated,
|
||||
this, [this]() {
|
||||
@ -2180,7 +2182,9 @@ void NotebookNodeExplorer::setupShortcuts()
|
||||
|
||||
// Copy
|
||||
{
|
||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Copy), this, Qt::WidgetWithChildrenShortcut);
|
||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Copy),
|
||||
this,
|
||||
Qt::WidgetWithChildrenShortcut);
|
||||
if (shortcut) {
|
||||
connect(shortcut, &QShortcut::activated,
|
||||
this, [this]() {
|
||||
@ -2191,7 +2195,9 @@ void NotebookNodeExplorer::setupShortcuts()
|
||||
|
||||
// Cut
|
||||
{
|
||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Cut), this);
|
||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Cut),
|
||||
this,
|
||||
Qt::WidgetWithChildrenShortcut);
|
||||
if (shortcut) {
|
||||
connect(shortcut, &QShortcut::activated,
|
||||
this, [this]() {
|
||||
@ -2202,7 +2208,9 @@ void NotebookNodeExplorer::setupShortcuts()
|
||||
|
||||
// Paste
|
||||
{
|
||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Paste), this);
|
||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Paste),
|
||||
this,
|
||||
Qt::WidgetWithChildrenShortcut);
|
||||
if (shortcut) {
|
||||
connect(shortcut, &QShortcut::activated,
|
||||
this, &NotebookNodeExplorer::pasteNodesFromClipboard);
|
||||
@ -2211,7 +2219,9 @@ void NotebookNodeExplorer::setupShortcuts()
|
||||
|
||||
// Properties
|
||||
{
|
||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Properties), this);
|
||||
auto shortcut = WidgetUtils::createShortcut(coreConfig.getShortcut(CoreConfig::Properties),
|
||||
this,
|
||||
Qt::WidgetWithChildrenShortcut);
|
||||
if (shortcut) {
|
||||
connect(shortcut, &QShortcut::activated,
|
||||
this, [this]() {
|
||||
@ -2222,7 +2232,7 @@ void NotebookNodeExplorer::setupShortcuts()
|
||||
|
||||
const auto &sessionConfig = ConfigMgr::getInst().getSessionConfig();
|
||||
for (const auto &pro : sessionConfig.getExternalPrograms()) {
|
||||
auto shortcut = WidgetUtils::createShortcut(pro.m_shortcut, this);
|
||||
auto shortcut = WidgetUtils::createShortcut(pro.m_shortcut, this, Qt::WidgetWithChildrenShortcut);
|
||||
const auto &name = pro.m_name;
|
||||
if (shortcut) {
|
||||
connect(shortcut, &QShortcut::activated,
|
||||
|
Loading…
x
Reference in New Issue
Block a user