From 291ce1d9ac77f25f155cd671577170608affd257 Mon Sep 17 00:00:00 2001 From: Patrick Valsecchi Date: Mon, 14 Oct 2013 21:20:53 +0200 Subject: Fix the DC ceiling in the profile. entry->ndl is computed and therefore should not be used for showing the DC's ceiling. That made the DC ceiling jump to 0m when the computed celing was at 0. Signed-off-by: Patrick Valsecchi Signed-off-by: Dirk Hohndel --- qt-ui/profilegraphics.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp index c145ff521..3f871970a 100644 --- a/qt-ui/profilegraphics.cpp +++ b/qt-ui/profilegraphics.cpp @@ -1037,8 +1037,8 @@ void ProfileGraphicsView::plot_depth_profile() /* Show any ceiling we may have encountered */ if (prefs.profile_dc_ceiling) { for (i = gc.pi.nr - 1; i >= 0; i--, entry--) { - if (entry->ndl) { - /* non-zero NDL implies this is a safety stop, no ceiling */ + if (!entry->in_deco) { + /* not in deco implies this is a safety stop, no ceiling */ p.append(QPointF(SCALEGC(entry->sec, 0))); } else if (entry->stopdepth < entry->depth) { p.append(QPointF(SCALEGC(entry->sec, entry->stopdepth))); @@ -1068,8 +1068,8 @@ void ProfileGraphicsView::plot_depth_profile() entry = gc.pi.entry; p.append(QPointF(SCALEGC(0, 0))); for (i = 0; i < gc.pi.nr; i++, entry++) { - if (entry->ndl == 0 && entry->stopdepth) { - if (entry->ndl == 0 && entry->stopdepth < entry->depth) { + if (entry->in_deco && entry->stopdepth) { + if (entry->stopdepth < entry->depth) { p.append(QPointF(SCALEGC(entry->sec, entry->stopdepth))); } else { p.append(QPointF(SCALEGC(entry->sec, entry->depth))); @@ -1143,7 +1143,7 @@ void ProfileGraphicsView::plot_depth_profile() p.append(QPointF(SCALEGC(entry->sec, entry->depth))); for (i-- , entry--; i >= 0; i--, entry--) { - if (entry->ndl == 0 && entry->stopdepth > entry->depth) { + if (entry->in_deco && entry->stopdepth > entry->depth) { p.append(QPointF(SCALEGC(entry->sec, entry->stopdepth))); } else { p.append(QPointF(SCALEGC(entry->sec, entry->depth))); -- cgit v1.2.3-70-g09d2