diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/diveplanner.cpp | 13 | ||||
-rw-r--r-- | qt-ui/mainwindow.cpp | 5 |
2 files changed, 3 insertions, 15 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 41f265ffa..cf09ebaba 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -256,7 +256,6 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg connect(ui.buttonBox, SIGNAL(rejected()), plannerModel, SLOT(cancelPlan())); connect(plannerModel, SIGNAL(planCreated()), MainWindow::instance(), SLOT(removeFakeDiveForAddAndPlan())); connect(plannerModel, SIGNAL(planCreated()), MainWindow::instance(), SLOT(showProfile())); - connect(plannerModel, SIGNAL(planCreated()), MainWindow::instance(), SLOT(refreshDisplay())); connect(plannerModel, SIGNAL(planCanceled()), MainWindow::instance(), SLOT(removeFakeDiveForAddAndPlan())); connect(plannerModel, SIGNAL(planCanceled()), MainWindow::instance(), SLOT(showProfile())); @@ -666,7 +665,6 @@ void DivePlannerPointsModel::cancelPlan() stagingDive = NULL; } setPlanMode(NOTHING); - MainWindow::instance()->graphics()->setProfileState(); diveplan.dp = NULL; } @@ -866,17 +864,10 @@ void DivePlannerPointsModel::createPlan() // Remove and clean the diveplan, so we don't delete // the dive by mistake. diveplan.dp = NULL; - clear(); - - // we unselected all dives earlier, so as a side effect recreating the dive list will select the new dive - MainWindow::instance()->recreateDiveList(); planCreated(); setPlanMode(NOTHING); free(stagingDive); stagingDive = NULL; - oldRecalc = plannerModel->setRecalc(false); - CylindersModel::instance()->setDive(current_dive); - CylindersModel::instance()->update(); - plannerModel->setRecalc(oldRecalc); - MainWindow::instance()->graphics()->setProfileState(); + // we unselected all dives earlier, so as a side effect recreating the dive list will select the new dive + MainWindow::instance()->refreshDisplay(); } diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 7bf1ce6ec..50172fe47 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -301,10 +301,7 @@ void MainWindow::enableDcShortcuts() void MainWindow::showProfile() { enableDcShortcuts(); - //TODO: I BROKE THIS BY COMMENTING THE LINE BELOW - // and I'm sleepy now, so I think I should not try to fix right away. - // we don't setCurrentIndex anymore, we ->setPlanState() or ->setAddState() on the ProfileView. - //ui.stackedWidget->setCurrentIndex(PROFILE); + ui.newProfile->setProfileState(); ui.infoPane->setCurrentIndex(MAINTAB); } |