summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/divetextitem.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-01-27 17:09:08 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-28 11:31:18 -0800
commit9f6ebf96a73c9663ea20a8c3e245bc3d9a4f3747 (patch)
treee9f4392b6fc3d54154c5cf546041271285ecda9c /qt-ui/profile/divetextitem.cpp
parent7a07665d89aa26d37a8aa8defd20cbe1a569c874 (diff)
downloadsubsurface-9f6ebf96a73c9663ea20a8c3e245bc3d9a4f3747.tar.gz
Use the same behavior as the old time markers
This commit adds the same behavior for the old time markers on the new ones. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/divetextitem.cpp')
-rw-r--r--qt-ui/profile/divetextitem.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/qt-ui/profile/divetextitem.cpp b/qt-ui/profile/divetextitem.cpp
index 163bb64f4..72ba480a9 100644
--- a/qt-ui/profile/divetextitem.cpp
+++ b/qt-ui/profile/divetextitem.cpp
@@ -42,11 +42,13 @@ const QString& DiveTextItem::text()
void DiveTextItem::updateText()
{
- if(internalText.isEmpty())
- return;
-
delete textItem;
+ textItem = NULL;
delete textBackgroundItem;
+ textBackgroundItem = NULL;
+ if(internalText.isEmpty()){
+ return;
+ }
QFont fnt(qApp->font());
QFontMetrics fm(fnt);