summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Kangas <janne.kangas@qt.io>2018-06-01 09:54:25 +0300
committerJanne Kangas <janne.kangas@qt.io>2018-06-01 07:02:42 +0000
commit1a7eabb8bc9d073fdf815d2317f90b76e4a2d272 (patch)
treee87e4fba0098b06327fcd27c7e105bcac5c3718f
parent4dbd48a69438cee52138e64a57f660275c341585 (diff)
Prevent timer-triggered property update when value is already committed
Stop slider rate-limiting timer when user releases mouse button and value is committed to property system, to prevent timer triggering an unnecessary non-committing property change. Instead at button release just update the associated text field to reflect the committed value. Change-Id: Ia0587b1fa1c3860b0d07bd653d91e7dc2240c293 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Marianne Yrjänä <marianne.yrjana@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r--src/Authoring/Studio/Palettes/Action/HandlerPropertyBaseSlider.qml6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Authoring/Studio/Palettes/Action/HandlerPropertyBaseSlider.qml b/src/Authoring/Studio/Palettes/Action/HandlerPropertyBaseSlider.qml
index ad016b86..853ed438 100644
--- a/src/Authoring/Studio/Palettes/Action/HandlerPropertyBaseSlider.qml
+++ b/src/Authoring/Studio/Palettes/Action/HandlerPropertyBaseSlider.qml
@@ -117,8 +117,12 @@ Row {
}
onPressedChanged: {
- if (!pressed)
+ if (!pressed) {
+ if (rateLimiter.running)
+ rateLimiter.stop();
+ textField.setTextFieldValue()
root.editingFinished();
+ }
}
MouseArea {