diff options
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index faeed2065..fd579a5c4 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -116,6 +116,15 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : reportedCeiling->setZValue(1); scene()->addItem(reportedCeiling); + diveCeiling = new DiveCalculatedCeiling(); + diveCeiling->setHorizontalAxis(timeAxis); + diveCeiling->setVerticalAxis(profileYAxis); + diveCeiling->setModel(dataModel); + diveCeiling->setVerticalDataColumn(DivePlotDataModel::CEILING); + diveCeiling->setHorizontalDataColumn(DivePlotDataModel::TIME); + diveCeiling->setZValue(1); + scene()->addItem(diveCeiling); + background->setFlag(QGraphicsItem::ItemIgnoresTransformations); //enum State{ EMPTY, PROFILE, EDIT, ADD, PLAN, INVALID }; @@ -373,19 +382,6 @@ void ProfileWidget2::plotDives(QList<dive*> dives) gasPressureItem->setZValue(1); scene()->addItem(gasPressureItem); - if(diveCeiling){ - scene()->removeItem(diveCeiling); - delete diveCeiling; - } - diveCeiling = new DiveCalculatedCeiling(); - diveCeiling->setHorizontalAxis(timeAxis); - diveCeiling->setVerticalAxis(profileYAxis); - diveCeiling->setModel(dataModel); - diveCeiling->setVerticalDataColumn(DivePlotDataModel::CEILING); - diveCeiling->setHorizontalDataColumn(DivePlotDataModel::TIME); - diveCeiling->setZValue(1); - scene()->addItem(diveCeiling); - diveComputerText->setText(currentdc->model); diveComputerText->animateMoveTo(1 , sceneRect().height()); |