summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-04 06:52:50 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-04 06:52:50 -0700
commit9b4bd80e847360e56c10bde6e2b96a1d1c2585f2 (patch)
tree759a8e0aa1592fc86916d417b6986dc9045f726e /qt-ui/mainwindow.cpp
parentc728b4b7bb5d089436af34e2d419c265deb85a99 (diff)
downloadsubsurface-9b4bd80e847360e56c10bde6e2b96a1d1c2585f2.tar.gz
UI restructure
Don't clear out the model after we already set up the cylinders. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 2fc700752..fc7447860 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -497,6 +497,7 @@ void MainWindow::on_actionAddDive_triggered()
displayed_dive.dc.model = "manually added dive"; // don't translate! this is stored in the XML file
// setup the dive cylinders
+ DivePlannerPointsModel::instance()->clear();
DivePlannerPointsModel::instance()->setupCylinders();
// now show the mostly empty main tab
@@ -509,7 +510,6 @@ void MainWindow::on_actionAddDive_triggered()
ui.infoPane->setCurrentIndex(MAINTAB);
ui.newProfile->setAddState();
- DivePlannerPointsModel::instance()->clear();
DivePlannerPointsModel::instance()->createSimpleDive();
ui.newProfile->plotDive();
}