diff options
Diffstat (limited to 'qt-ui/profile')
-rw-r--r-- | qt-ui/profile/divetooltipitem.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/qt-ui/profile/divetooltipitem.cpp b/qt-ui/profile/divetooltipitem.cpp index ea3a74901..46d50be02 100644 --- a/qt-ui/profile/divetooltipitem.cpp +++ b/qt-ui/profile/divetooltipitem.cpp @@ -126,11 +126,13 @@ void ToolTipItem::expand() nextRectangle.setWidth(width); nextRectangle.setHeight(height); - QPropertyAnimation *animation = new QPropertyAnimation(this, "rect", this); - animation->setDuration(100); - animation->setStartValue(rectangle); - animation->setEndValue(nextRectangle); - animation->start(QAbstractAnimation::DeleteWhenStopped); + if (nextRectangle != rectangle) { + QPropertyAnimation *animation = new QPropertyAnimation(this, "rect", this); + animation->setDuration(100); + animation->setStartValue(rectangle); + animation->setEndValue(nextRectangle); + animation->start(QAbstractAnimation::DeleteWhenStopped); + } status = EXPANDED; } |