mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
Avoid ambiguity for Ctrl+F in the Execute SQL tab
When the Ctrl+F was used in the Scintilla widgets of the SQL Log or Edit Database Cell docks, the shortcut was ambiguous with the search find bar action, which had window context. Now the later has widget context and a new widget-context shortcut is explicitly connected to the action in the editors of each new SQL tab. See issue #1746
This commit is contained in:
@@ -2264,6 +2264,10 @@ int MainWindow::openSqlTab(bool resetCounter)
|
||||
w->getEditor()->setFocus();
|
||||
connect(w, SIGNAL(findFrameVisibilityChanged(bool)), ui->actionSqlFind, SLOT(setChecked(bool)));
|
||||
|
||||
// Connect now the find shortcut to the editor with widget context, so it isn't ambiguous with other Scintilla Widgets.
|
||||
QShortcut* shortcutFind = new QShortcut(ui->actionSqlFind->shortcut(), w->getEditor(), nullptr, nullptr, Qt::WidgetShortcut);
|
||||
connect(shortcutFind, SIGNAL(activated()), ui->actionSqlFind, SLOT(toggle()));
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user