diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2014-01-21 15:42:33 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-21 11:35:36 -0800 |
commit | 4159faa950dbb5c826987402f5b670af3aa013a7 (patch) | |
tree | 9389f50991363c712863d2705c5ba2c1e46b6775 /qt-ui/profile/profilewidget2.cpp | |
parent | a73f00dcac196a997094ed4bc8c0099c876a228e (diff) | |
download | subsurface-4159faa950dbb5c826987402f5b670af3aa013a7.tar.gz |
Remember to clean the tissues when changing dives.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 045e7ee54..790b2c611 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -375,6 +375,7 @@ void ProfileWidget2::plotDives(QList<dive*> dives) diveComputerText->animateMoveTo(1 , sceneRect().height()); qDeleteAll(allTissues); + allTissues.clear(); for(int i = 0; i < 16; i++){ DiveCalculatedCeiling *tissueItem = new DiveCalculatedCeiling(); tissueItem->setHorizontalAxis(timeAxis); @@ -382,6 +383,7 @@ void ProfileWidget2::plotDives(QList<dive*> dives) tissueItem->setModel(dataModel); tissueItem->setVerticalDataColumn(DivePlotDataModel::TISSUE_1 + i); tissueItem->setHorizontalDataColumn(DivePlotDataModel::TIME); + allTissues.append(tissueItem); scene()->addItem(tissueItem); } emit startProfileState(); |