diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2014-02-10 15:01:04 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-10 09:57:45 -0800 |
commit | bb71707321cdb0f47861ee91cd0ef6fa5e415778 (patch) | |
tree | 8459bf3981eaf07b08713f5d0e67b3abc726506a /qt-ui | |
parent | cafc7e4b1338156c9a3294a8f1037b5a31fffdbb (diff) | |
download | subsurface-bb71707321cdb0f47861ee91cd0ef6fa5e415778.tar.gz |
Fixed item visibility on emptyState after being on profileState.
Background was not correctly back to it's original position
and a few other items kept their visibility when it shouldn't.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/profile/divecartesianaxis.cpp | 8 | ||||
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp index c45546825..5bb0d9498 100644 --- a/qt-ui/profile/divecartesianaxis.cpp +++ b/qt-ui/profile/divecartesianaxis.cpp @@ -391,9 +391,9 @@ void DiveCartesianPlane::setup() // DEPTH is M_OR_FEET(10,30), Minutes are 600, per line. for (int i = leftAxis->minimum(), max = leftAxis->maximum(); i < max; i += M_OR_FT(10,30)) { - DiveLineItem *line = new DiveLineItem(); + DiveLineItem *line = new DiveLineItem(this); line->setLine(0, 0, horizontalSize, 0); - line->setPos(left,leftAxis->posAtValue(i)); + line->setPos(0,leftAxis->posAtValue(i)-top); line->setZValue(-1); line->setPen(gridPen()); horizontalLines.push_back(line); @@ -401,9 +401,9 @@ void DiveCartesianPlane::setup() } for (int i = bottomAxis->minimum(), max = bottomAxis->maximum(); i < max; i += 600) { // increments by 10 minutes. - DiveLineItem *line = new DiveLineItem(); + DiveLineItem *line = new DiveLineItem(this); line->setLine(0, 0, 0, verticalSize); - line->setPos(bottomAxis->posAtValue(i), top); + line->setPos(bottomAxis->posAtValue(i)-left, 0); line->setZValue(-1); line->setPen(gridPen()); verticalLines.push_back(line); diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 69ec8b9e2..6b53e9bf5 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -147,6 +147,7 @@ void ProfileWidget2::setupItemOnScene() cartesianPlane->setBottomAxis(timeAxis); cartesianPlane->setLeftAxis(profileYAxis); + cartesianPlane->setZValue(-1); diveComputerText->setAlignment(Qt::AlignRight | Qt::AlignBottom); diveComputerText->setBrush(getColor(TIME_TEXT)); @@ -440,14 +441,15 @@ void ProfileWidget2::setEmptyState() gasYAxis->setPos(itemPos.partialgas.pos.off); timeAxis->setPos(itemPos.time.pos.off); background->setY( itemPos.background.on.y()); + background->setVisible(true); toolTipItem->setVisible(false); temperatureAxis->setPos(itemPos.temperature.pos.off); cylinderPressureAxis->setPos(itemPos.cylinder.pos.off); - cartesianPlane->setVisible(false); meanDepth->setVisible(false); diveComputerText->setVisible(false); diveCeiling->setVisible(false); reportedCeiling->setVisible(false); + cartesianPlane->setVisible(false); Q_FOREACH(DiveCalculatedTissue *tissue, allTissues){ tissue->setVisible(false); } |