Fix the ghost-text-on-profile regression

The last patch correctly moved the GasPressure item to use
a cache-based system, but ignored the fact that the Gas
pressure text was not being removed from the scene. this fixed
it.

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-23 15:37:50 -02:00 committed by Dirk Hohndel
parent 2c2d3351ac
commit 555ca8245d

View file

@ -284,6 +284,10 @@ void DiveGasPressureItem::modelDataChanged()
}
setPolygon(boundingPoly);
//TODO: Instead of deleting all texts, move the existing ones to it's new location.
qDeleteAll(texts);
texts.clear();
int mbar, cyl;
int seen_cyl[MAX_CYLINDERS] = { false, };
int last_pressure[MAX_CYLINDERS] = { 0, };