summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2013-07-11 11:34:31 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-11 18:26:33 +0200
commite0d3fe3a4a76bb8f172044281e289894dd33fa42 (patch)
tree8bf366a70652c676f4c16015dcd1075cb6a1cc61
parent2c22f6445f69d12afac01e3fd74d21decc14d4b3 (diff)
downloadqtquickcontrols-e0d3fe3a4a76bb8f172044281e289894dd33fa42.tar.gz
SplitView: bugfix animating split items
Only assign a new width/height to a splitter item when needed (that is, the value was clamped). Otherwise we just end up breaking bindings and animations without a good reason. Change-Id: Ic33007713f6450d52c9f5bd958fca74095413638 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
-rw-r--r--src/controls/SplitView.qml4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/controls/SplitView.qml b/src/controls/SplitView.qml
index 439d9053..1cc8199f 100644
--- a/src/controls/SplitView.qml
+++ b/src/controls/SplitView.qml
@@ -324,7 +324,9 @@ Item {
for (var i=0; i<__items.length; ++i) {
if (i !== d.fillIndex) {
var item = __items[i];
- item[d.size] = clampedMinMax(item[d.size], item.Layout[d.minimum], item.Layout[d.maximum])
+ var clampedSize = clampedMinMax(item[d.size], item.Layout[d.minimum], item.Layout[d.maximum])
+ if (clampedSize != item[d.size])
+ item[d.size] = clampedSize
}
}