aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-01-23 15:37:50 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-23 21:11:14 -0800
commit555ca8245d5675bc943a2a0786d4c0168344161c (patch)
treea7b8e1cf1ac3e5e059699faa2b644648818fe43e /qt-ui
parent2c2d3351ac3718c13adab88c9b9b9f73ab17aced (diff)
downloadsubsurface-555ca8245d5675bc943a2a0786d4c0168344161c.tar.gz
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>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/diveprofileitem.cpp4
1 files changed, 4 insertions, 0 deletions
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, };