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>
This commit is contained in:
Anton Lundin 2013-09-17 08:25:09 +02:00 committed by Dirk Hohndel
parent 88b7ac3d08
commit 25a2d6e6f9

View file

@ -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 {