summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/maintab.cpp4
-rw-r--r--qt-ui/models.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index eef8fdd6b..4ec3941f2 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -757,6 +757,8 @@ void MainTab::acceptChanges()
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::NOTHING);
MainWindow::instance()->dive_list()->verticalScrollBar()->setSliderPosition(scrolledBy);
MainWindow::instance()->dive_list()->setFocus();
+ cylindersModel->changed = false;
+ weightModel->changed = false;
}
void MainTab::resetPallete()
@@ -818,6 +820,8 @@ void MainTab::rejectChanges()
MainWindow::instance()->globe()->reload();
// show the profile and dive info
MainWindow::instance()->graphics()->replot();
+ cylindersModel->changed = false;
+ weightModel->changed = false;
cylindersModel->updateDive();
weightModel->updateDive();
}
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 0bdbfccd9..777329cb9 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -312,7 +312,6 @@ void CylindersModel::updateDive()
displayed_dive.cylinder[i].manually_added))
rows = i + 1;
}
- changed = false;
if (rows > 0) {
beginInsertRows(QModelIndex(), 0, rows - 1);
endInsertRows();
@@ -636,7 +635,6 @@ void WeightModel::updateDive()
rows = i + 1;
}
}
- changed = false;
if (rows > 0) {
beginInsertRows(QModelIndex(), 0, rows - 1);
endInsertRows();