From 25a2d6e6f9698383589a7399033eef4ffbc72d41 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Tue, 17 Sep 2013 08:25:09 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/profilegraphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/profilegraphics.cpp') 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 { -- cgit v1.2.3-70-g09d2