[PATCH] Bugfix plot of ceiling violation

Anton Lundin glance at acc.umu.se
Thu Aug 8 15:01:51 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
---
 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 6f064ab..67e6f96 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