UI restructure

Don't clear out the model after we already set up the cylinders.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-07-04 06:52:50 -07:00
parent c728b4b7bb
commit 9b4bd80e84

View file

@ -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();
}