diff options
-rw-r--r-- | qt-models/cylindermodel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp index 594df658c..d0675ed8a 100644 --- a/qt-models/cylindermodel.cpp +++ b/qt-models/cylindermodel.cpp @@ -242,7 +242,7 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const if (gasmix_distance(mygas, gas2) == 0 && is_cylinder_used(&displayed_dive, i)) same_gas = i; } - if (same_gas == -1 && + if ((in_planner() || same_gas == -1) && ((DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING && DivePlannerPointsModel::instance()->tankInUse(index.row())) || (DivePlannerPointsModel::instance()->currentMode() == DivePlannerPointsModel::NOTHING && @@ -265,7 +265,7 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const if (gasmix_distance(mygas, gas2) == 0 && is_cylinder_used(&displayed_dive, i)) same_gas = i; } - if (same_gas == -1 && + if ((in_planner() || same_gas == -1) && ((DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING && DivePlannerPointsModel::instance()->tankInUse(index.row())) || (DivePlannerPointsModel::instance()->currentMode() == DivePlannerPointsModel::NOTHING && @@ -569,7 +569,7 @@ void CylindersModel::remove(const QModelIndex &index) if (gasmix_distance(mygas, gas2) == 0 && is_cylinder_used(&displayed_dive, i)) same_gas = i; } - if (same_gas == -1 && + if ((in_planner() || same_gas == -1) && ((DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING && DivePlannerPointsModel::instance()->tankInUse(index.row())) || (DivePlannerPointsModel::instance()->currentMode() == DivePlannerPointsModel::NOTHING && |