[PATCH] Bugfix plot of ceiling violation

Anton Lundin glance at acc.umu.se
Mon Sep 16 23:25:09 UTC 2013


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 at acc.umu.se>
---
 qt-ui/profilegraphics.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index ad412e4..fe5d79b 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 {
-- 
1.8.1.2



More information about the subsurface mailing list