From 1894bdd3cbafdbc5e80fdd36e3e667851e48f91a Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 19 Aug 2014 21:13:09 -0500 Subject: [PATCH] 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 --- qt-ui/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 401c114f8..c8461aee8 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -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();