mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Remember to clean the tissues when changing dives.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a73f00dcac
commit
4159faa950
1 changed files with 2 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue