Skip to content

Commit 986830f

Browse files
committed
MainWindow::treeSchemaDock make copy shortcut use widget context
Changed shortcut context to Qt::WidgetShortcut to restrict activation to when treeSchemaDock has focus. Previously, the shortcut used Qt::WindowShortcut, which allowed it to trigger anywhere in the window. This caused it to override other shortcuts—preventing ExtendedTableWidget from using its own copy shortcut.
1 parent 3b21045 commit 986830f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/MainWindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ void MainWindow::init()
273273
connect(ui->actionCopyInSchema, &QAction::triggered, this, [=]() {
274274
dbStructureModel->copy(ui->treeSchemaDock->selectionModel()->selectedIndexes());
275275
});
276-
auto copyShortcut = new QShortcut(QKeySequence::Copy, ui->treeSchemaDock);
276+
auto copyShortcut = new QShortcut(QKeySequence::Copy, ui->treeSchemaDock, nullptr, nullptr, Qt::WidgetShortcut);
277277
connect(copyShortcut, &QShortcut::activated, this, [=]() {
278278
dbStructureModel->copy(ui->treeSchemaDock->selectionModel()->selectedIndexes());
279279
});

0 commit comments

Comments
 (0)