From 6576790ff62f663b7092411ef23babfb9b52e080 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 28 May 2014 21:30:21 -0700 Subject: Add dive: only copy cylinders when necessary If the stagingDive is just an alias for the current_dive (as it is in dive ADD mode), there's no need to copy the cylinders; they are already there. Signed-off-by: Dirk Hohndel --- qt-ui/diveplanner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 215898389..c3ba26932 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -116,7 +116,7 @@ void DivePlannerPointsModel::copyCylinders(dive *d) // setup the cylinder widget accordingly void DivePlannerPointsModel::setupCylinders() { - if (!stagingDive) + if (!stagingDive || stagingDive == current_dive) return; if (current_dive) { -- cgit v1.2.3-70-g09d2