summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/divecartesianaxis.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-01-17 14:43:25 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-17 14:04:47 -0800
commit779c1b6738c4378be79a46b744da2c556380ca32 (patch)
tree699733e78e58c6c14cc12e2aa4ab30a6737a99db /qt-ui/profile/divecartesianaxis.cpp
parent0787347691aec0521f1e3fa749415aae70bd4cd3 (diff)
downloadsubsurface-779c1b6738c4378be79a46b744da2c556380ca32.tar.gz
Create a version of create_graph_info that doesn't depend on GC.
This version of the create plot info is the same as before, with the difference that it doesn't depends on the gc. Also fixed a crash. The Pressure Index, Information and interpolated seems wrong, I'm getting only zeroes. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/divecartesianaxis.cpp')
-rw-r--r--qt-ui/profile/divecartesianaxis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp
index 3ab4a4e26..043f193ea 100644
--- a/qt-ui/profile/divecartesianaxis.cpp
+++ b/qt-ui/profile/divecartesianaxis.cpp
@@ -51,7 +51,7 @@ void DiveCartesianAxis::updateTicks()
double currValue = min;
// Remove the uneeded Ticks / Texts.
- if (ticks.size() > steps) {
+ if (!ticks.isEmpty() && ticks.size() > steps) {
while (ticks.size() > steps) {
DiveLineItem *removedLine = ticks.takeLast();
removedLine->animatedHide();