mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Change the Ruler text values when metric system changes.
"ups", as I did this in Metric system I forgot to update to imperial when the user selected it. Fixes #665 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
936f057ddc
commit
078332bae1
3 changed files with 11 additions and 22 deletions
|
@ -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)
|
||||
|
|
|
@ -83,9 +83,6 @@ protected:
|
|||
private
|
||||
slots:
|
||||
void settingsChanged();
|
||||
|
||||
private:
|
||||
bool showWithPPGraph;
|
||||
};
|
||||
|
||||
class TimeAxis : public DiveCartesianAxis {
|
||||
|
|
|
@ -450,7 +450,6 @@ void ProfileWidget2::plotDive(struct dive *d, bool force)
|
|||
temperatureAxis->setMinimum(pInfo.mintemp);
|
||||
temperatureAxis->setMaximum(pInfo.maxtemp);
|
||||
|
||||
|
||||
if (pInfo.maxhr) {
|
||||
heartBeatAxis->setMinimum(pInfo.minhr);
|
||||
heartBeatAxis->setMaximum(pInfo.maxhr);
|
||||
|
|
Loading…
Add table
Reference in a new issue