summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/profilewidget2.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 3451ddf40..3aa1acdae 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -125,6 +125,18 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
diveCeiling->setZValue(1);
scene()->addItem(diveCeiling);
+ for(int i = 0; i < 16; i++){
+ DiveCalculatedTissue *tissueItem = new DiveCalculatedTissue();
+ tissueItem->setHorizontalAxis(timeAxis);
+ tissueItem->setVerticalAxis(profileYAxis);
+ tissueItem->setModel(dataModel);
+ tissueItem->setVerticalDataColumn(DivePlotDataModel::TISSUE_1 + i);
+ tissueItem->setHorizontalDataColumn(DivePlotDataModel::TIME);
+ tissueItem->setZValue(1);
+ allTissues.append(tissueItem);
+ scene()->addItem(tissueItem);
+ }
+
background->setFlag(QGraphicsItem::ItemIgnoresTransformations);
//enum State{ EMPTY, PROFILE, EDIT, ADD, PLAN, INVALID };
@@ -384,21 +396,6 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
diveComputerText->setText(currentdc->model);
diveComputerText->animateMoveTo(1 , sceneRect().height());
-
- qDeleteAll(allTissues);
- allTissues.clear();
- for(int i = 0; i < 16; i++){
- DiveCalculatedTissue *tissueItem = new DiveCalculatedTissue();
- tissueItem->setHorizontalAxis(timeAxis);
- tissueItem->setVerticalAxis(profileYAxis);
- tissueItem->setModel(dataModel);
- tissueItem->setVerticalDataColumn(DivePlotDataModel::TISSUE_1 + i);
- tissueItem->setHorizontalDataColumn(DivePlotDataModel::TIME);
- tissueItem->setZValue(1);
- allTissues.append(tissueItem);
- scene()->addItem(tissueItem);
- }
-
emit startProfileState();
}