diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-06-26 15:31:01 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-26 15:49:19 -0700 |
commit | f6d133d7423bb0dc2f17c1c68dc50de1ff6824a7 (patch) | |
tree | 62de6192abae0d76e2199600b6b57ba2dd960f17 /qt-ui/mainwindow.cpp | |
parent | 81fd56b16fd4678626a9cadec7311fffbccec502 (diff) | |
download | subsurface-f6d133d7423bb0dc2f17c1c68dc50de1ff6824a7.tar.gz |
Fix crash when trying to add a dive or plan when a filter is active.
The planner used the selected dive on the dive list, and
when there's a filtering in action it can be in a state where
there's no dive selected.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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(); |