From e419ebf55a28d2483951e52ca274aedd96f11789 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 25 Jan 2021 21:45:29 +0100 Subject: planner: move clearing of model into loadFromDive() function Both loadFromDive() callers were clearing the model before calling loadFromDive(). Move the clearing into that function since it makes no sense to load into a non-cleared model. Apparently this changes the way that no-cylinder dives are treated and the code in ProfileWidget2::repositionDiveHandlers() must now explicitly check for that condition. Signed-off-by: Berthold Stoeger --- desktop-widgets/mainwindow.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'desktop-widgets/mainwindow.cpp') diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 03f0dc57c..2230b05fc 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -1514,7 +1514,6 @@ void MainWindow::editCurrentDive() return; disableShortcuts(); - DivePlannerPointsModel::instance()->clear(); DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::ADD); graphics->setAddState(); setApplicationState(ApplicationState::EditDive); -- cgit v1.2.3-70-g09d2