diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-03-07 14:29:15 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-07 18:33:05 +0100 |
commit | c58290ee7af6f2abcd08cbf319ff6f85b9db9fdb (patch) | |
tree | a05314476cbbb57cfb4983d63fd2671308ebec79 /src/controls/SpinBox.qml | |
parent | 8c142768e42c450c14225b1d9354836aec0b0126 (diff) | |
download | qtquickcontrols-c58290ee7af6f2abcd08cbf319ff6f85b9db9fdb.tar.gz |
Fix initialization value of SpinBox
The maximumValue 99 was enforced on value _before_ we had a chance
to update it. This made it sometimes impossible to get a maximumValue
higher than 99.
Change-Id: Ia07a9271d563fd3496b583757df757c1e7b4ceb5
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/controls/SpinBox.qml')
-rw-r--r-- | src/controls/SpinBox.qml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index 4b6d4e85..c82e3410 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -153,6 +153,8 @@ Control { } /*! \internal */ + property bool __initialized: false + /*! \internal */ readonly property bool __upEnabled: value != maximumValue; /*! \internal */ readonly property bool __downEnabled: value != minimumValue; @@ -196,9 +198,13 @@ Control { /*! \internal */ onMinimumValueChanged: input.setValue(value) /*! \internal */ - Component.onCompleted: input.setValue(value) + Component.onCompleted: { + __initialized = true; + input.setValue(value) + } + /*! \internal */ - onValueChanged: input.setValue(value) + onValueChanged: if (__initialized) input.setValue(value) Accessible.name: input.text Accessible.role: Accessible.SpinBox |