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>
This commit is contained in:
Dirk Hohndel 2014-05-28 13:11:40 -07:00
parent fa705a5bc9
commit 97e56b0382

View file

@ -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();
}