diff options
Diffstat (limited to 'profile-widget/divecartesianaxis.cpp')
| -rw-r--r-- | profile-widget/divecartesianaxis.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/profile-widget/divecartesianaxis.cpp b/profile-widget/divecartesianaxis.cpp index 944b636cc..8ee74e7f1 100644 --- a/profile-widget/divecartesianaxis.cpp +++ b/profile-widget/divecartesianaxis.cpp @@ -361,17 +361,16 @@ QColor DepthAxis::colorForValue(double) const return QColor(Qt::red); } -DepthAxis::DepthAxis(ProfileWidget2 *widget) : DiveCartesianAxis(widget) +DepthAxis::DepthAxis(ProfileWidget2 *widget) : DiveCartesianAxis(widget), + unitSystem(prefs.units.length) { connect(&diveListNotifier, &DiveListNotifier::settingsChanged, this, &DepthAxis::settingsChanged); changed = true; - settingsChanged(); } void DepthAxis::settingsChanged() { - static int unitSystem = prefs.units.length; - if ( unitSystem == prefs.units.length ) + if (unitSystem == prefs.units.length) return; changed = true; updateTicks(); |