aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Patrick Valsecchi <patrick@thus.ch>2013-10-14 21:20:53 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-14 12:30:32 -0700
commit291ce1d9ac77f25f155cd671577170608affd257 (patch)
tree989437b043217476ff8a666c017e8a6268099676
parent39d7ae5f3a09b90865adaca78ffcf085cd557464 (diff)
downloadsubsurface-291ce1d9ac77f25f155cd671577170608affd257.tar.gz
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 <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/profilegraphics.cpp10
1 files changed, 5 insertions, 5 deletions
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)));