diff options
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 3970e6f3a..201c68f41 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -70,7 +70,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : temperatureAxis->setTickSize(2); temperatureAxis->setTickInterval(300); - cylinderPressureAxis->setOrientation(DiveCartesianAxis::TopToBottom); + cylinderPressureAxis->setOrientation(DiveCartesianAxis::BottomToTop); cylinderPressureAxis->setLine(0,20,0,60); cylinderPressureAxis->setX(3); cylinderPressureAxis->setTickSize(2); @@ -336,6 +336,18 @@ void ProfileWidget2::plotDives(QList<dive*> dives) temperatureItem->setHorizontalDataColumn(DivePlotDataModel::TIME); scene()->addItem(temperatureItem); + if(gasPressureItem){ + scene()->removeItem(gasPressureItem); + delete gasPressureItem; + } + gasPressureItem = new DiveGasPressureItem(); + gasPressureItem->setHorizontalAxis(timeAxis); + gasPressureItem->setVerticalAxis(cylinderPressureAxis); + gasPressureItem->setModel(dataModel); + gasPressureItem->setVerticalDataColumn(DivePlotDataModel::TEMPERATURE); + gasPressureItem->setHorizontalDataColumn(DivePlotDataModel::TIME); + scene()->addItem(gasPressureItem); + emit startProfileState(); } |