diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-05-30 16:12:35 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-30 16:12:35 -0700 |
commit | 6f1e071a54224700de8f96d0eefa0ee807f886b0 (patch) | |
tree | 49557fb4aa7e58659fd82a91e33f491b24c251cd /qt-ui | |
parent | a0136a3b8c7c20e2d28a6757d7356bbec6154a6c (diff) | |
download | subsurface-6f1e071a54224700de8f96d0eefa0ee807f886b0.tar.gz |
Planner: don't recreate the dive while cleaning up the widgets
Otherwise the change to the Cylinder widget would trigger a recreation of
the dive in an inconsistent state.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/diveplanner.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 76f81961f..21559a65a 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -764,6 +764,7 @@ void DivePlannerPointsModel::clear() } else { stagingDive = alloc_dive(); } + bool oldRecalc = setRecalc(false); CylindersModel::instance()->setDive(stagingDive); if (rowCount() > 0) { beginRemoveRows(QModelIndex(), 0, rowCount() - 1); @@ -771,6 +772,7 @@ void DivePlannerPointsModel::clear() endRemoveRows(); } CylindersModel::instance()->clear(); + setRecalc(oldRecalc); } void DivePlannerPointsModel::addDecoToModel() |