profile: always update axis-positions when plotting dive

The placement of the axes was done independently of the
plotting, e.g. when settings changed. Presumably,
for performance reasons. However, since the axes may
depend on whether a dive has heart-rate data or not,
this simply is not viable. To make this work, one
would have to remember whether the previous dive
showed the heart-rate, etc. Not worth it - always
reposition the axes. It should not matte performance-
wise.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-09-11 21:43:53 +02:00 committed by Dirk Hohndel
parent a031f3444c
commit 0bef8167d2
3 changed files with 11 additions and 16 deletions

View file

@ -263,7 +263,6 @@ void ProfileWidget2::actionRequestedReplot(bool)
void ProfileWidget2::settingsChanged()
{
profileScene->updateAxes(false);
replot();
}
@ -448,8 +447,6 @@ void ProfileWidget2::setProfileState()
currentState = PROFILE;
setBackgroundBrush(getColor(::BACKGROUND, profileScene->isGrayscale));
profileScene->updateAxes(true);
#ifndef SUBSURFACE_MOBILE
toolTipItem->readPos();
toolTipItem->setVisible(true);