From 555ca8245d5675bc943a2a0786d4c0168344161c Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 23 Jan 2014 15:37:50 -0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/profile/diveprofileitem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp index c2c95bd89..25d6a8415 100644 --- a/qt-ui/profile/diveprofileitem.cpp +++ b/qt-ui/profile/diveprofileitem.cpp @@ -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, }; -- cgit v1.2.3-70-g09d2