aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickitem.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@jollamobile.com>2015-02-12 15:36:44 +1000
committerAaron McCarthy <mccarthy.aaron@gmail.com>2015-02-12 23:54:25 +0000
commit1cb329aaaa68ead31c0ae91a69193c7ae08e25b0 (patch)
treee310fa724feae330e9d16571638798d4849771b2 /src/quick/items/qquickitem.cpp
parentc6f0e3967992780e7786d6bdd90b21149009f2fd (diff)
Fix width/height property assignment during animations.
During animations the behavior of anchors.fill: parent and width: parent.width height: parent.height can be different resulting in subtle UI bugs where the final value of a property is not applied because it is within epsilon of the previous value. Fixed by directly comparing the width and height instead of using operator==(QSize, QSize) which does a fuzzy comparison. Change-Id: I4288b93db2b7baacd9f71ae1932ae743a428313a Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r--src/quick/items/qquickitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 6a00f80171..d1369fb3ff 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -6372,7 +6372,7 @@ void QQuickItem::setSize(const QSizeF &size)
d->heightValid = true;
d->widthValid = true;
- if (QSizeF(d->width, d->height) == size)
+ if (d->width == size.width() && d->height == size.height())
return;
qreal oldHeight = d->height;