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>
This commit is contained in:
Tomaz Canabrava 2014-01-27 17:09:08 -02:00 committed by Dirk Hohndel
parent 7a07665d89
commit 9f6ebf96a7
3 changed files with 30 additions and 7 deletions

View file

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