summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/divetextitem.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/qt-ui/profile/divetextitem.cpp b/qt-ui/profile/divetextitem.cpp
index 24f9d6b25..761f0e6f7 100644
--- a/qt-ui/profile/divetextitem.cpp
+++ b/qt-ui/profile/divetextitem.cpp
@@ -24,8 +24,10 @@ DiveTextItem::DiveTextItem(QGraphicsItem *parent) : QGraphicsItemGroup(parent),
void DiveTextItem::setAlignment(int alignFlags)
{
- internalAlignFlags = alignFlags;
- updateText();
+ if (alignFlags != internalAlignFlags) {
+ internalAlignFlags = alignFlags;
+ updateText();
+ }
}
void DiveTextItem::setBrush(const QBrush &b)
@@ -35,13 +37,18 @@ void DiveTextItem::setBrush(const QBrush &b)
void DiveTextItem::setScale(double newscale)
{
- scale = newscale;
+ if (scale != newscale) {
+ scale = newscale;
+ updateText();
+ }
}
void DiveTextItem::setText(const QString &t)
{
- internalText = t;
- updateText();
+ if (internalText != t) {
+ internalText = t;
+ updateText();
+ }
}
const QString &DiveTextItem::text()