Fix toggling of partial pressure graphs

When toggling the display of the partial pressure graph, the graph was
either not shown correctly or unnecessary ticks were left in the graph.
Calling the settingsChanged() method of the profileYAxis object solves
the problem by initializing the ticks according to the selected graphs.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2017-11-25 10:38:15 +01:00 committed by Dirk Hohndel
parent 6343515fed
commit 82898a837d

View file

@ -828,6 +828,7 @@ void ProfileWidget2::settingsChanged()
// because the GF could have changed; otherwise we try to avoid replot()
bool needReplot = prefs.calcceiling;
#ifndef SUBSURFACE_MOBILE
gasYAxis->settingsChanged(); // Initialize ticks of partial pressure graph
if ((prefs.percentagegraph||prefs.hrgraph) && PP_GRAPHS_ENABLED) {
profileYAxis->animateChangeLine(itemPos.depth.shrinked);
temperatureAxis->setPos(itemPos.temperatureAll.pos.on);