Fix obscure display bug in profile widget, where heat map wasn't shown

Fixes an obscure bug, which happened under very specific circumstances.
Precodition: fresh program start and neither of the partial pressure
graphs, nor the heat maps are shown. User clicks on heat map icon.
Bug: The heat map is not shown at the bottom of the graph.

The fix consists in replacing two percentageAxis->setLine() calls
by precentageAxis->animateChangeLine() calls.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2017-11-23 22:39:17 +01:00 committed by Dirk Hohndel
parent 04f38d61d7
commit 178dcbc0c6

View file

@ -839,7 +839,7 @@ void ProfileWidget2::settingsChanged()
percentageAxis->animateChangeLine(itemPos.percentageWithTankBar.expanded); percentageAxis->animateChangeLine(itemPos.percentageWithTankBar.expanded);
heartBeatAxis->setPos(itemPos.heartBeatWithTankBar.pos.on); heartBeatAxis->setPos(itemPos.heartBeatWithTankBar.pos.on);
heartBeatAxis->animateChangeLine(itemPos.heartBeatWithTankBar.expanded); heartBeatAxis->animateChangeLine(itemPos.heartBeatWithTankBar.expanded);
}else { } else {
percentageAxis->setPos(itemPos.percentage.pos.on); percentageAxis->setPos(itemPos.percentage.pos.on);
percentageAxis->animateChangeLine(itemPos.percentage.expanded); percentageAxis->animateChangeLine(itemPos.percentage.expanded);
heartBeatAxis->setPos(itemPos.heartBeat.pos.on); heartBeatAxis->setPos(itemPos.heartBeat.pos.on);
@ -847,7 +847,6 @@ void ProfileWidget2::settingsChanged()
} }
gasYAxis->setPos(itemPos.partialPressureTissue.pos.on); gasYAxis->setPos(itemPos.partialPressureTissue.pos.on);
gasYAxis->animateChangeLine(itemPos.partialPressureTissue.expanded); gasYAxis->animateChangeLine(itemPos.partialPressureTissue.expanded);
} else if (PP_GRAPHS_ENABLED || prefs.hrgraph || prefs.percentagegraph) { } else if (PP_GRAPHS_ENABLED || prefs.hrgraph || prefs.percentagegraph) {
profileYAxis->animateChangeLine(itemPos.depth.intermediate); profileYAxis->animateChangeLine(itemPos.depth.intermediate);
temperatureAxis->setPos(itemPos.temperature.pos.on); temperatureAxis->setPos(itemPos.temperature.pos.on);
@ -857,14 +856,14 @@ void ProfileWidget2::settingsChanged()
percentageAxis->setPos(itemPos.percentageWithTankBar.pos.on); percentageAxis->setPos(itemPos.percentageWithTankBar.pos.on);
percentageAxis->animateChangeLine(itemPos.percentageWithTankBar.expanded); percentageAxis->animateChangeLine(itemPos.percentageWithTankBar.expanded);
gasYAxis->setPos(itemPos.partialPressureWithTankBar.pos.on); gasYAxis->setPos(itemPos.partialPressureWithTankBar.pos.on);
gasYAxis->setLine(itemPos.partialPressureWithTankBar.expanded); gasYAxis->animateChangeLine(itemPos.partialPressureWithTankBar.expanded);
heartBeatAxis->setPos(itemPos.heartBeatWithTankBar.pos.on); heartBeatAxis->setPos(itemPos.heartBeatWithTankBar.pos.on);
heartBeatAxis->animateChangeLine(itemPos.heartBeatWithTankBar.expanded); heartBeatAxis->animateChangeLine(itemPos.heartBeatWithTankBar.expanded);
} else { } else {
gasYAxis->setPos(itemPos.partialPressure.pos.on); gasYAxis->setPos(itemPos.partialPressure.pos.on);
gasYAxis->animateChangeLine(itemPos.partialPressure.expanded); gasYAxis->animateChangeLine(itemPos.partialPressure.expanded);
percentageAxis->setPos(itemPos.percentage.pos.on); percentageAxis->setPos(itemPos.percentage.pos.on);
percentageAxis->setLine(itemPos.percentage.expanded); percentageAxis->animateChangeLine(itemPos.percentage.expanded);
heartBeatAxis->setPos(itemPos.heartBeat.pos.on); heartBeatAxis->setPos(itemPos.heartBeat.pos.on);
heartBeatAxis->animateChangeLine(itemPos.heartBeat.expanded); heartBeatAxis->animateChangeLine(itemPos.heartBeat.expanded);
} }