summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-07-29 18:48:17 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-29 15:33:00 -0700
commitf0f8b91c0067e4b472e5f90b270621f4cef3b8ac (patch)
tree32a2a9e9b0e8caaea892a1ddc7653718d22019a9 /qt-ui/profile
parent078332bae1263ebc9419ab7a818e1d727406beab (diff)
downloadsubsurface-f0f8b91c0067e4b472e5f90b270621f4cef3b8ac.tar.gz
Make the Axis set the changed flag when a new line is set
This was preventing the recalculation of the ticks, making the line static when we enabled or disabled the PP graphs. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r--qt-ui/profile/divecartesianaxis.cpp6
-rw-r--r--qt-ui/profile/divecartesianaxis.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp
index be3e313f0..e28d1c443 100644
--- a/qt-ui/profile/divecartesianaxis.cpp
+++ b/qt-ui/profile/divecartesianaxis.cpp
@@ -252,6 +252,12 @@ void DiveCartesianAxis::updateTicks(color_indice_t color)
changed = false;
}
+void DiveCartesianAxis::setLine(const QLineF &line)
+{
+ QGraphicsLineItem::setLine(line);
+ changed = true;
+}
+
void DiveCartesianAxis::animateChangeLine(const QLineF &newLine)
{
setLine(newLine);
diff --git a/qt-ui/profile/divecartesianaxis.h b/qt-ui/profile/divecartesianaxis.h
index 77e2697cc..15155692e 100644
--- a/qt-ui/profile/divecartesianaxis.h
+++ b/qt-ui/profile/divecartesianaxis.h
@@ -45,6 +45,7 @@ public:
void setTextVisible(bool arg1);
void setLinesVisible(bool arg1);
void setLineSize(qreal lineSize);
+ void setLine(const QLineF& line);
int unitSystem;
public
slots: