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>
This commit is contained in:
Tomaz Canabrava 2014-01-21 17:11:04 -02:00 committed by Dirk Hohndel
parent 58d9282955
commit 8831bf6350

View file

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