diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-07-15 20:33:48 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-15 20:36:25 -0700 |
commit | 0cf55d7e39316b4b3fc271f556e8ff8abfae8db0 (patch) | |
tree | d53944f486d5688a0d89d5ae2e68c94ed03e0df3 /qt-ui/maintab.cpp | |
parent | 327ea3aca4ca5ced8593f702de4f68603a8dad22 (diff) | |
download | subsurface-0cf55d7e39316b4b3fc271f556e8ff8abfae8db0.tar.gz |
Correctly track the 'changed' status of the equipment widgets
updateDive() cannot reset the changed status - this is called while the
dive is edited. Instead this status is reset when the user either accepts
or rejects the changes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 4 |
1 files changed, 4 insertions, 0 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(); } |