diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-05-28 13:11:40 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-28 13:12:56 -0700 |
commit | 97e56b03827c2aa860ce025853c759ed96790221 (patch) | |
tree | f56c37cf24ae5a3c4abdc9aaa536671ddb80a2f6 /qt-ui | |
parent | fa705a5bc90553f9aea697ed9eb3881c482ad6df (diff) | |
download | subsurface-97e56b03827c2aa860ce025853c759ed96790221.tar.gz |
Planner: prevent crash when canceling plan with existing dive list
There is still something seriously wrong here.
For now let's just not restore the selection and at least this prevents us
from crashing. But I still don't understand why it crashes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/mainwindow.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 6cf7160b7..a3247636e 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -401,7 +401,12 @@ void MainWindow::planCanceled() { removeFakeDiveForAddAndPlan(); showProfile(); - dive_list()->restoreSelection(); + // restoring the selection causes a crash - somehow the model appears to be confused + // or maybe our internal data structures are messed up? + // commenting this out fixes the crash + // + // dive_list()->restoreSelection(); + dive_list()->reload(DiveTripModel::CURRENT); refreshDisplay(); } |