File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -3473,7 +3473,8 @@ void MainWindow::enterBrowseMode()
3473
3473
void MainWindow::enterSearchMode ()
3474
3474
{
3475
3475
ui->searchBar ->show ();
3476
- ui->searchBar ->setFocus (Qt::ShortcutFocusReason);
3476
+ if ( !ui->searchBar ->hasFocus () )
3477
+ ui->searchBar ->setFocus (Qt::ShortcutFocusReason);
3477
3478
3478
3479
if ( !ui->searchBar ->text ().isEmpty () ) {
3479
3480
auto c = browserOrNull ();
@@ -3490,7 +3491,8 @@ void MainWindow::enterSearchMode(const QString &txt)
3490
3491
const bool searchModeActivated = !ui->searchBar ->isVisible ();
3491
3492
3492
3493
ui->searchBar ->show ();
3493
- ui->searchBar ->setFocus (Qt::ShortcutFocusReason);
3494
+ if ( !ui->searchBar ->hasFocus () )
3495
+ ui->searchBar ->setFocus (Qt::ShortcutFocusReason);
3494
3496
3495
3497
if (searchModeActivated)
3496
3498
ui->searchBar ->setText (txt);
You can’t perform that action at this time.
0 commit comments