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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-05-28 21:30:21 -07:00
parent b601db30ad
commit 6576790ff6

View file

@ -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) {