diff options
-rw-r--r-- | qt-ui/divelistview.cpp | 6 | ||||
-rw-r--r-- | qt-ui/divelistview.h | 1 | ||||
-rw-r--r-- | qt-ui/mainwindow.cpp | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index 78186ecd0..4f5bfec26 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -825,3 +825,9 @@ void DiveListView::updateLastImageTimeOffset(const int offset) s.beginGroup("MainWindow"); s.setValue("LastImageTimeOffset", offset); } + +void DiveListView::endSearch() +{ + searchBox.clear(); + searchBox.hide(); +} diff --git a/qt-ui/divelistview.h b/qt-ui/divelistview.h index 320bf954f..7ab409b42 100644 --- a/qt-ui/divelistview.h +++ b/qt-ui/divelistview.h @@ -52,6 +52,7 @@ slots: void shiftTimes(); void loadImages(); static QString lastUsedImageDir(); + void endSearch(); signals: void currentDiveChanged(int divenr); diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 10b3e5304..dc4e06fec 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -467,6 +467,7 @@ void MainWindow::on_actionDivePlanner_triggered() if(!plannerStateClean()) return; + ui.ListWidget->endSearch(); // put us in PLAN mode DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN); ui.newProfile->setPlanState(); @@ -497,6 +498,7 @@ void MainWindow::on_actionAddDive_triggered() if(!plannerStateClean()) return; + ui.ListWidget->endSearch(); DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::ADD); createFakeDiveForAddAndPlan(); |