diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-11-15 20:50:44 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-11-16 08:29:53 -0800 |
commit | f0a89759bf38375d32ad70ba4710a98d30a47e5d (patch) | |
tree | e49f74e6d4fad9a19c05384138edb061dcda69c1 /profile-widget/divetooltipitem.h | |
parent | 12c7c5ea961bcdc866dbf6ce121c428d43c3730b (diff) | |
download | subsurface-f0a89759bf38375d32ad70ba4710a98d30a47e5d.tar.gz |
Profile: clear tooltip's plotInfo in ProfileWidget2::setEmptyState
The tooltip's plotInfo was not cleared when clearing the profile.
With the new cylinder code, this lead to crashes, because the
displayed_dive's cylinder array is now cleared. The old code would
happily read stale data from the fixed-size cylinders array.
Clear the plotInfo explicitly.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/divetooltipitem.h')
-rw-r--r-- | profile-widget/divetooltipitem.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/profile-widget/divetooltipitem.h b/profile-widget/divetooltipitem.h index 714782843..0ae399bcb 100644 --- a/profile-widget/divetooltipitem.h +++ b/profile-widget/divetooltipitem.h @@ -44,6 +44,7 @@ public: void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); void setTimeAxis(DiveCartesianAxis *axis); void setPlotInfo(const plot_info &plot); + void clearPlotInfo(); void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); public slots: |