profile: when clearing the profile, also reset the profile data

When hovering over the chart after the chart was cleared,
there were artifacts owing to the stale profile data.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-12-04 16:11:58 +01:00 committed by Dirk Hohndel
parent 789eb2c620
commit ecd3334a1c

View file

@ -197,6 +197,7 @@ void ProfileScene::clear()
// the DiveEventItems
qDeleteAll(eventItems);
eventItems.clear();
free_plot_info_data(&plotInfo);
}
static bool ppGraphsEnabled(const struct divecomputer *dc, bool simplified)