From 02fbaffe4c5c4e60c2b84b71f4f4b00ecb78ef9f Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 24 Dec 2020 19:21:30 +0100 Subject: profile: explicitly clear profile items In contrast to most other items, which are cleared in the setEmptyState() function, the profile items are cleared indirectly via a signal from the model. Very hard to follow and indeed, I thought I could just remove the slot. Do this explicitly instead for deterministic code. Signed-off-by: Berthold Stoeger --- profile-widget/diveprofileitem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'profile-widget/diveprofileitem.h') diff --git a/profile-widget/diveprofileitem.h b/profile-widget/diveprofileitem.h index 0b928514c..d85ec64fe 100644 --- a/profile-widget/diveprofileitem.h +++ b/profile-widget/diveprofileitem.h @@ -37,10 +37,10 @@ class AbstractProfilePolygonItem : public QObject, public QGraphicsPolygonItem { public: AbstractProfilePolygonItem(const DivePlotDataModel &model, const DiveCartesianAxis &hAxis, int hColumn, const DiveCartesianAxis &vAxis, int vColumn); virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) = 0; + void clear(); public slots: virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()); - virtual void modelDataRemoved(const QModelIndex &parent, int from, int to); void replot(); void setVisible(bool visible); -- cgit v1.2.3-70-g09d2