summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-01-21 17:11:04 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-21 14:24:08 -0800
commit8831bf6350cc2836803c7a8e0afce96727a88964 (patch)
tree92a63d6ad25a1ecf02631a54fe117de79e510ce4
parent58d9282955b5e3c1e60125784e95f8d300554f5e (diff)
downloadsubsurface-8831bf6350cc2836803c7a8e0afce96727a88964.tar.gz
If we draw ceilings in red do not dig a hole on the profile.
This is an attempt to speed up painting a bit. Since we will draw the red ceiling on top of the profile, I don't see a reason to dig a hole in it, creating an more complex shape to be passed to the painter. Easier shapes are easier to draw. ( I think ) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/profile/diveprofileitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index d190efcc1..5cb064983 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -103,7 +103,7 @@ void DiveProfileItem::modelDataChanged(){
return;
/* Show any ceiling we may have encountered */
- if (prefs.profile_dc_ceiling) {
+ if (prefs.profile_dc_ceiling && !prefs.profile_red_ceiling) {
QPolygonF p = polygon();
plot_data *entry = dataModel->data() + dataModel->rowCount()-1;
for (int i = dataModel->rowCount() - 1; i >= 0; i--, entry--) {