mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Planner: fix calculation when it is safe to surface
We were comparing with a negative depth which apparently confused the algorithm. Fixes #611 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9661926131
commit
6c9aaf406a
2 changed files with 3 additions and 2 deletions
|
@ -167,7 +167,7 @@ void DiveProfileItem::modelDataChanged(const QModelIndex &topLeft, const QModelI
|
|||
plot_data *entry = dataModel->data().entry + dataModel->rowCount() - 1;
|
||||
for (int i = dataModel->rowCount() - 1; i >= 0; i--, entry--) {
|
||||
int max = maxCeiling(i);
|
||||
// Don't screem if we violate the ceiling by a few cm
|
||||
// Don't scream if we violate the ceiling by a few cm
|
||||
if (entry->depth < max - 100)
|
||||
profileColor = QColor(Qt::red);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue