profile: fix instant logic

There was logic to disable animation when switching from "no dive"
to "show dive". However, that has bit-rotted away: the plotted
dive was set before plotting the dive and therefore the check
for "change from empty" did not work. Introduce an explicit
empty flag instead.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-12-03 08:50:52 +01:00 committed by Dirk Hohndel
parent e7b078a7fd
commit f13768fe65
2 changed files with 8 additions and 7 deletions

View file

@ -146,11 +146,9 @@ private:
#ifndef SUBSURFACE_MOBILE
ToolTipItem *toolTipItem;
#endif
// All those here should probably be merged into one structure,
// So it's esyer to replicate for more dives later.
// In the meantime, keep it here.
const struct dive *d;
int dc;
bool empty; // No dive shown.
#ifndef SUBSURFACE_MOBILE
DiveLineItem *mouseFollowerVertical;
DiveLineItem *mouseFollowerHorizontal;