summaryrefslogtreecommitdiffstats
path: root/qt-ui/profilegraphics.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-09-17 08:25:09 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-17 07:31:55 -0400
commit25a2d6e6f9698383589a7399033eef4ffbc72d41 (patch)
tree2a60a9997f292639f6896f87f86e9ed5811988d1 /qt-ui/profilegraphics.cpp
parent88b7ac3d0800759120c9a3559aefdbf7df39f9fe (diff)
downloadsubsurface-25a2d6e6f9698383589a7399033eef4ffbc72d41.tar.gz
Bugfix plot of ceiling violation
Due to a bug in how the entry-list was handled, a point on the polygon was introduced at 0,0 that made a weird pink triangle across the whole profile. This was quite clearly seen in dives/test15.xml Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profilegraphics.cpp')
-rw-r--r--qt-ui/profilegraphics.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index ad412e4b0..fe5d79b4e 100644
--- a/qt-ui/profilegraphics.cpp
+++ b/qt-ui/profilegraphics.cpp
@@ -1064,7 +1064,7 @@ void ProfileGraphicsView::plot_depth_profile()
for (i = 0; i < gc.pi.nr; i++, entry++)
p.append(QPointF(SCALEGC(entry->sec, entry->depth)));
- for (i = gc.pi.nr - 1; i >= 0; i--, entry--) {
+ for (i-- , entry--; i >= 0; i--, entry--) {
if (entry->ndl == 0 && entry->stopdepth > entry->depth) {
p.append(QPointF(SCALEGC(entry->sec, entry->stopdepth)));
} else {