mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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:
parent
fa705a5bc9
commit
97e56b0382
1 changed files with 6 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue