From 86d7f6ace06adf13fe5045a217c4f264356a01df Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 28 May 2014 15:54:04 -0300 Subject: Move code from the Planner that doesn't belongs there. Moved the connections between DivePlannerPointsModel and MainWindow from inside the Planner class to the MainWindow. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/diveplanner.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'qt-ui/diveplanner.cpp') diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 131cf300a..215898389 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -274,9 +274,6 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg // Creating (and canceling) the plan connect(ui.buttonBox, SIGNAL(accepted()), plannerModel, SLOT(createPlan())); 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(planCanceled()), MainWindow::instance(), SLOT(planCanceled())); /* set defaults. */ ui.startTime->setTime(QTime(1, 0)); @@ -879,10 +876,8 @@ void DivePlannerPointsModel::createPlan() // Remove and clean the diveplan, so we don't delete // the dive by mistake. diveplan.dp = NULL; - planCreated(); setPlanMode(NOTHING); free(stagingDive); stagingDive = NULL; - // we unselected all dives earlier, so as a side effect recreating the dive list will select the new dive - MainWindow::instance()->refreshDisplay(); + planCreated(); } -- cgit v1.2.3-70-g09d2