summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/divecartesianaxis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profile/divecartesianaxis.cpp')
-rw-r--r--qt-ui/profile/divecartesianaxis.cpp29
1 files changed, 11 insertions, 18 deletions
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp
index f5123ae9e..be3e313f0 100644
--- a/qt-ui/profile/divecartesianaxis.cpp
+++ b/qt-ui/profile/divecartesianaxis.cpp
@@ -308,9 +308,9 @@ qreal DiveCartesianAxis::posAtValue(qreal value)
double retValue = realSize * percent;
double adjusted =
orientation == LeftToRight ? retValue + m.x1() + p.x() :
- orientation == RightToLeft ? retValue + m.x1() + p.x() :
- orientation == TopToBottom ? retValue + m.y1() + p.y() :
- /* entation == BottomToTop */ retValue + m.y1() + p.y();
+ orientation == RightToLeft ? retValue + m.x1() + p.x() :
+ orientation == TopToBottom ? retValue + m.y1() + p.y() :
+ /* entation == BottomToTop */ retValue + m.y1() + p.y();
return adjusted;
}
@@ -365,28 +365,21 @@ static bool isPPGraphEnabled()
return prefs.pp_graphs.po2 || prefs.pp_graphs.pn2 || prefs.pp_graphs.phe;
}
-DepthAxis::DepthAxis() : showWithPPGraph(false)
+DepthAxis::DepthAxis()
{
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
-
- // force the correct size of the line.
- showWithPPGraph = !isPPGraphEnabled();
+ changed = true;
settingsChanged();
}
void DepthAxis::settingsChanged()
{
- // bool ppGraph = isPPGraphEnabled();
- // if ( ppGraph == showWithPPGraph){
- // return;
- // }
- //
- // if (ppGraph) {
- // animateChangeLine(shrinkedLine);
- // } else {
- // animateChangeLine(expandedLine);
- // }
- // showWithPPGraph = ppGraph;
+ static int unitSystem = prefs.units.length;
+ if ( unitSystem == prefs.units.length )
+ return;
+ changed = true;
+ updateTicks();
+ unitSystem = prefs.units.length;
}
QColor TimeAxis::colorForValue(double value)