mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 22:35:27 +00:00
Don't trigger creation of dive from invalid plan in planCreated()
This is subtle. The modifications to the selection cause a redraw of the profile. So we need to make sure that we leave the plan state and return to profile state BEFORE we do this, otherwise we'll call into createTemporaryPlan() with invalid data. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5b0f4e79c4
commit
1894bdd3cb
1 changed files with 1 additions and 0 deletions
|
@ -407,6 +407,7 @@ void MainWindow::planCanceled()
|
|||
void MainWindow::planCreated()
|
||||
{
|
||||
// get the new dive selected and assign a number if reasonable
|
||||
ui.newProfile->setProfileState();
|
||||
if (displayed_dive.id == 0) {
|
||||
// we might have added a new dive (so displayed_dive was cleared out by clone_dive()
|
||||
dive_list()->unselectDives();
|
||||
|
|
Loading…
Add table
Reference in a new issue