summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profile')
-rw-r--r--qt-ui/profile/profilewidget2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index e314c337f..8e3641b66 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -1391,10 +1391,10 @@ void ProfileWidget2::changeGas()
// backup the things on the dataModel, since we will clear that out.
struct gasmix gasmix;
- int seconds = timeAxis->valueAt(scenePos);
+ qreal sec_val = timeAxis->valueAt(scenePos);
// no gas changes before the dive starts
- seconds = seconds > 0 ?: 0;
+ unsigned int seconds = (sec_val < 0.0) ? 0 : (unsigned int)sec_val;
// if there is a gas change at this time stamp, remove it before adding the new one
struct event *gasChangeEvent = current_dc->events;