aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/profile/profilewidget2.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 2f7505d22..568b90889 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -365,9 +365,11 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
meanDepth->animateMoveTo(3, profileYAxis->posAtValue(pInfo.meandepth));
dataModel->setDive(current_dive, pInfo);
+ // The event items are a bit special since we don't know how many events are going to
+ // exist on a dive, so I cant create cache items for that. that's why they are here
+ // while all other items are up there on the constructor.
qDeleteAll(eventItems);
eventItems.clear();
-
struct event *event = currentdc->events;
while (event) {
DiveEventItem *item = new DiveEventItem();