diff options
author | ConfuSomu | 2023-08-02 02:34:01 +0200 |
---|---|---|
committer | ConfuSomu | 2023-08-02 02:34:01 +0200 |
commit | 56a64ae4c5c4cf3fb567445a1bcec0f3a9db143c (patch) | |
tree | c43c1f1def305c8fcaf38cc31c118cf295650355 /src/mainwindow.cpp | |
parent | 88e272b40dd9b0a182662ac77296dc2330b2027f (diff) | |
download | ActorViewer-56a64ae4c5c4cf3fb567445a1bcec0f3a9db143c.tar ActorViewer-56a64ae4c5c4cf3fb567445a1bcec0f3a9db143c.tar.gz ActorViewer-56a64ae4c5c4cf3fb567445a1bcec0f3a9db143c.zip |
Initialize find dialog with text from main window
Properly emit the text that was entered in the search bar before the
find dialog was opened. This makes sure that it is queried as expected
by the user.
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4b3b010..89f550d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -108,6 +108,9 @@ void MainWindow::on_actionFind_triggered(bool checked) { connect(find_dialog, &FindDialog::item_selected, this, &MainWindow::select_list_item); connect(this, &MainWindow::search_text_changed, find_dialog, &FindDialog::set_search_text); connect(find_dialog, &FindDialog::search_text_changed, this, &MainWindow::set_search_text); + + if (not ui->textInputSearch->text().isEmpty()) + emit search_text_changed(ui->textInputSearch->text(), true); } find_dialog->show(); |