From 1a7eabb8bc9d073fdf815d2317f90b76e4a2d272 Mon Sep 17 00:00:00 2001 From: Janne Kangas Date: Fri, 1 Jun 2018 09:54:25 +0300 Subject: Prevent timer-triggered property update when value is already committed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Marianne Yrjänä Reviewed-by: Tomi Korpipää --- src/Authoring/Studio/Palettes/Action/HandlerPropertyBaseSlider.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 { -- cgit v1.2.3