summaryrefslogtreecommitdiffstats
path: root/qt-models/cylindermodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/cylindermodel.cpp')
-rw-r--r--qt-models/cylindermodel.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp
index 59d993374..4ae98da5b 100644
--- a/qt-models/cylindermodel.cpp
+++ b/qt-models/cylindermodel.cpp
@@ -20,7 +20,7 @@ CylindersModel::CylindersModel(QObject *parent) :
QVariant CylindersModel::headerData(int section, Qt::Orientation orientation, int role) const
{
- if (role == Qt::DisplayRole && in_planner() && section == WORKINGPRESS)
+ if (role == Qt::DisplayRole && orientation == Qt::Horizontal && in_planner() && section == WORKINGPRESS)
return tr("Start press.");
else
return CleanerTableModel::headerData(section, orientation, role);
@@ -143,7 +143,7 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const
// seem implausible
case START:
case END:
- if ((cyl->start.mbar && !cyl->end.mbar) ||
+ if ((cyl->start.mbar && !cyl->end.mbar && !cyl->sample_end.mbar) ||
(cyl->end.mbar && cyl->start.mbar <= cyl->end.mbar))
ret = REDORANGE1_HIGH_TRANS;
break;
@@ -157,7 +157,7 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const
font.setItalic(!cyl->start.mbar);
break;
case END:
- font.setItalic(!cyl->end.mbar);
+ font.setItalic(!cyl->end.mbar && !cyl->sample_end.mbar);
break;
}
ret = font;
@@ -256,10 +256,10 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const
ret = tr("Switch depth for deco gas. Calculated using Deco pO₂ preference, unless set manually.");
break;
case MOD:
- ret = tr("Calculated using Bottom pO₂ preference. Setting MOD adjusts O₂%, set to '*' for best O₂% for max depth.");
+ ret = tr("Calculated using Bottom pO₂ preference. Setting MOD adjusts O₂%, set to '*' for best O₂% for max. depth.");
break;
case MND:
- ret = tr("Calculated using Best Mix END preference. Setting MND adjusts He%, set to '*' for best He% for max depth.");
+ ret = tr("Calculated using Best Mix END preference. Setting MND adjusts He%, set to '*' for best He% for max. depth.");
break;
}
break;
@@ -383,7 +383,7 @@ bool CylindersModel::setData(const QModelIndex &index, const QVariant &value, in
if (CHANGED()) {
if (QString::compare(vString.toUtf8().data(), "*") == 0) {
cyl->bestmix_o2 = true;
- // Calculate fO2 for max depth
+ // Calculate fO2 for max. depth
cyl->gasmix.o2 = best_o2(displayed_dive.maxdepth, &displayed_dive);
} else {
cyl->bestmix_o2 = false;
@@ -400,7 +400,7 @@ bool CylindersModel::setData(const QModelIndex &index, const QVariant &value, in
if (CHANGED()) {
if (QString::compare(vString.toUtf8().data(), "*") == 0) {
cyl->bestmix_he = true;
- // Calculate fO2 for max depth
+ // Calculate fO2 for max. depth
cyl->gasmix.he = best_he(displayed_dive.maxdepth, &displayed_dive);
} else {
cyl->bestmix_he = false;