mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-12 13:16:16 +00:00
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>
This commit is contained in:
parent
0f5069784d
commit
fd45e646dc
1 changed files with 3 additions and 1 deletions
|
@ -365,9 +365,11 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
|
||||||
meanDepth->animateMoveTo(3, profileYAxis->posAtValue(pInfo.meandepth));
|
meanDepth->animateMoveTo(3, profileYAxis->posAtValue(pInfo.meandepth));
|
||||||
dataModel->setDive(current_dive, pInfo);
|
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);
|
qDeleteAll(eventItems);
|
||||||
eventItems.clear();
|
eventItems.clear();
|
||||||
|
|
||||||
struct event *event = currentdc->events;
|
struct event *event = currentdc->events;
|
||||||
while (event) {
|
while (event) {
|
||||||
DiveEventItem *item = new DiveEventItem();
|
DiveEventItem *item = new DiveEventItem();
|
||||||
|
|
Loading…
Add table
Reference in a new issue