diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-05-11 00:18:29 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-11 00:44:00 +0200 |
commit | a454ff7f445f50f86e947d9a7e528f36ca0e3c5e (patch) | |
tree | 3c377f763d0c54fe7b83949b5db8c27353b89bcc | |
parent | 91fc9b1823c0a95190005f3baaa4aa2276290f3a (diff) | |
download | qtquickcontrols-a454ff7f445f50f86e947d9a7e528f36ca0e3c5e.tar.gz |
Revert "Remove unneeded checks for -1 (infinity) in SplitView"v5.1.0-beta1
This reverts commit c5270bdb7261deaeed13c49ba8b4c17825b5619b
Since we reverted Change Ia638064f: Return infinity instead of -1 as a default value for max sizes, we have to revert this one as it depends on it.
Change-Id: I765b67ac7c77074bbcf75fd3010d146d2e00a0b0
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
-rw-r--r-- | src/controls/SplitView.qml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/controls/SplitView.qml b/src/controls/SplitView.qml index fc43874e..0c50bc3b 100644 --- a/src/controls/SplitView.qml +++ b/src/controls/SplitView.qml @@ -231,9 +231,9 @@ Item { function clampedMinMax(value, minimum, maximum) { - if (value < minimum) + if (minimum !== -1 && value < minimum) value = minimum - if (value > maximum) + if (maximum !== -1 && value > maximum) value = maximum return value } @@ -286,7 +286,8 @@ Item { var fillItem = __items[fillIndex] var superfluous = root[d.size] - d.accumulatedSize(0, __items.length, false) var s = Math.max(superfluous, fillItem.Layout[minimum]) - s = Math.min(s, fillItem.Layout[maximum]) + if (fillItem.Layout[maximum] !== -1) + s = Math.min(s, fillItem.Layout[maximum]) fillItem[d.size] = s } |