From b88e6dc5fa44049e56c80e02fc6778c0f18c670b Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sun, 25 May 2014 00:51:05 -0300 Subject: Remove leftovers from the planner. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'qt-ui/mainwindow.cpp') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 339ee8e8f..19a16a886 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -318,14 +318,16 @@ void MainWindow::on_actionDivePlanner_triggered() break; } } - ui.stackedWidget->setCurrentIndex(PLANNERPROFILE); ui.infoPane->setCurrentIndex(PLANNERWIDGET); } void MainWindow::showProfile() { enableDcShortcuts(); - ui.stackedWidget->setCurrentIndex(PROFILE); + //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.infoPane->setCurrentIndex(MAINTAB); } @@ -1101,14 +1103,20 @@ void MainWindow::editCurrentDive() if (defaultDC == "manually added dive") { disableDcShortcuts(); DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::ADD); - ui.stackedWidget->setCurrentIndex(PLANNERPROFILE); // Planner. + //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(PLANNERPROFILE); // Planner. ui.infoPane->setCurrentIndex(MAINTAB); DivePlannerPointsModel::instance()->loadFromDive(d); ui.InfoWidget->enableEdition(MainTab::MANUALLY_ADDED_DIVE); } else if (defaultDC == "planned dive") { disableDcShortcuts(); DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN); - ui.stackedWidget->setCurrentIndex(PLANNERPROFILE); // Planner. + //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(PLANNERPROFILE); // Planner. ui.infoPane->setCurrentIndex(PLANNERWIDGET); DivePlannerPointsModel::instance()->loadFromDive(d); ui.InfoWidget->enableEdition(MainTab::MANUALLY_ADDED_DIVE); -- cgit v1.2.3-70-g09d2