Find dialog based on the Find/Replace dialog for the Scintilla widgets

A new find dialog, bound to Ctrl+F, has been added to all the Scintilla
editors. The dialog is basically the Find/Replace dialog, whose replace
related controls have been set to invisible.

This shortcut and the new menu contextual entry are disabled for the
Execute SQL editors, since there the shortcut is already assigned to the
search bar and it would also be redundant.

See issue #1746
This commit is contained in:
mgrojo
2019-04-04 23:24:37 +02:00
parent eb2a6e0bd8
commit 5ca95a57bc
6 changed files with 44 additions and 4 deletions

View File

@@ -2258,6 +2258,9 @@ int MainWindow::openSqlTab(bool resetCounter)
int index = ui->tabSqlAreas->addTab(w, QString("SQL %1").arg(++tabNumber));
ui->tabSqlAreas->setCurrentIndex(index);
w->setFindFrameVisibility(ui->actionSqlFind->isChecked());
// Disable the find dialog in the SQL tabs, since the shortcut
// would interfere with the search bar and it'd be anyway redundant.
w->getEditor()->setEnabledFindDialog(false);
w->getEditor()->setFocus();
connect(w, SIGNAL(findFrameVisibilityChanged(bool)), ui->actionSqlFind, SLOT(setChecked(bool)));