summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-01-23 16:12:18 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-23 21:11:15 -0800
commitfd45e646dcee98978b85d4776dfbec2eb1587076 (patch)
tree36293530c5c41535814cfbe04c45d95f230ad943
parent0f5069784da9dd89c7c2d2b2a2de52d3f653d91c (diff)
downloadsubsurface-fd45e646dcee98978b85d4776dfbec2eb1587076.tar.gz
Added comments explaining why the events are created on the setDive
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-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();