aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/profile/diveeventitem.cpp1
-rw-r--r--qt-ui/profile/profilewidget2.cpp30
2 files changed, 19 insertions, 12 deletions
diff --git a/qt-ui/profile/diveeventitem.cpp b/qt-ui/profile/diveeventitem.cpp
index 7b748fedd..2250a7306 100644
--- a/qt-ui/profile/diveeventitem.cpp
+++ b/qt-ui/profile/diveeventitem.cpp
@@ -99,7 +99,6 @@ void DiveEventItem::setupToolTipString()
void DiveEventItem::eventVisibilityChanged(const QString& eventName, bool visible)
{
-
}
void DiveEventItem::recalculatePos()
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index d28f9358d..d64da9964 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -146,7 +146,7 @@ void ProfileWidget2::setupItemOnScene()
cartesianPlane->setBottomAxis(timeAxis);
cartesianPlane->setLeftAxis(profileYAxis);
- diveComputerText->setAlignment(Qt::AlignLeft | Qt::AlignTop);
+ diveComputerText->setAlignment(Qt::AlignRight | Qt::AlignTop);
diveComputerText->setBrush(getColor(TIME_TEXT));
setupItem(reportedCeiling, timeAxis, profileYAxis, dataModel, DivePlotDataModel::CEILING, DivePlotDataModel::TIME, 1);
@@ -490,15 +490,23 @@ void ProfileWidget2::setProfileState()
cartesianPlane->setVisible(true);
meanDepth->setVisible(true);
+
diveComputerText->setVisible(true);
- cartesianPlane->setHorizontalLine( timeAxis->line() );
- cartesianPlane->setVerticalLine( profileYAxis->line() );
-// diveCeiling->setVisible(true);
-// reportedCeiling->setVisible(true);
-// Q_FOREACH(DiveCalculatedTissue *tissue, allTissues){
-// tissue->setVisible(true);
-// }
-// Q_FOREACH(DiveEventItem *event, eventItems){
-// event->setVisible(true);
-// }
+ diveComputerText->setPos(itemPos.dcLabel.on);
+
+ cartesianPlane->setHorizontalLine( itemPos.time.expanded );
+ cartesianPlane->setVerticalLine( itemPos.depth.expanded );
+
+ diveCeiling->setVisible(s.value("calcceiling").toBool());
+ reportedCeiling->setVisible(s.value("dcceiling").toBool());
+
+ if(s.value("calcalltissues").toBool()){
+ Q_FOREACH(DiveCalculatedTissue *tissue, allTissues){
+ tissue->setVisible(true);
+ }
+ }
+ // Only set visible the ones that should be visible, but how?
+ Q_FOREACH(DiveEventItem *event, eventItems){
+ event->setVisible(true);
+ }
}