Skip to content

Commit bad1a54

Browse files
committed
Fix resource table shortcuts conflicting with OBS shortcuts
This could happen when adding the variable tab as a dock. The problem is visible in the OBS log: QAction::event: Ambiguous shortcut overload: Del
1 parent f706416 commit bad1a54

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/utils/resource-table.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,16 @@ ResourceTable::ResourceTable(QWidget *parent, const QString &help,
6565
[openSettings]() { openSettings(); });
6666

6767
auto settingsShortcut = new QShortcut(QKeySequence("F2"), this);
68+
settingsShortcut->setContext(Qt::WidgetWithChildrenShortcut);
6869
QWidget::connect(settingsShortcut, &QShortcut::activated, this,
6970
openSettings);
7071
auto removeShortcut = new QShortcut(QKeySequence("Del"), this);
72+
removeShortcut->setContext(Qt::WidgetWithChildrenShortcut);
7173
QWidget::connect(removeShortcut, &QShortcut::activated, this,
7274
[this]() { Remove(); });
7375

7476
auto newShortcut = new QShortcut(QKeySequence("Ctrl+N"), this);
77+
newShortcut->setContext(Qt::WidgetWithChildrenShortcut);
7578
QWidget::connect(newShortcut, &QShortcut::activated, this,
7679
[this]() { Add(); });
7780
}

0 commit comments

Comments
 (0)