summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 9d43da624..8963c1287 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -235,13 +235,13 @@ bool CylindersModel::setData(const QModelIndex &index, const QVariant &value, in
}
break;
case START:
- if (CHANGED()) {
+ if (CHANGED() && (!cyl->end.mbar || string_to_pressure(vString.toUtf8().data()).mbar >= cyl->end.mbar)) {
cyl->start = string_to_pressure(vString.toUtf8().data());
changed = true;
}
break;
case END:
- if (CHANGED()) {
+ if (CHANGED() && (!cyl->start.mbar || string_to_pressure(vString.toUtf8().data()).mbar <= cyl->start.mbar)) {
cyl->end = string_to_pressure(vString.toUtf8().data());
changed = true;
}