summaryrefslogtreecommitdiff
path: root/imports
diff options
context:
space:
mode:
authorAndreas Hartmetz <andreas.hartmetz@kdab.com>2016-12-02 16:42:19 +0100
committerAndreas Hartmetz <andreas.hartmetz@kdab.com>2016-12-07 17:14:03 +0000
commita210e423a334e33acd9b5c9d9fcdc13ed1a1a9ca (patch)
treed0a21a16c87fbcb131e677944265ba35f21a797f /imports
parentfc298ccec2ef0186cba29b0c7e565ee23e733628 (diff)
downloadneptune-ui-a210e423a334e33acd9b5c9d9fcdc13ed1a1a9ca.tar.gz
Ventilation item: fix changes by more than one step
Previously, two things did not work: - Changing by more than one level by directly tapping on the desired level. This was apparently intended to work but didn't, from looking at the code. - Changing by more than one level from the backend In both cases, the NumberAnimation on the view's index which was aliased to the ventilation level caused a changed signal for every step change, which, because it was the most recent change, became *the* change and caused the final value to fall short of the actual target value. After the core fix, a similar fix to the previous one is needed to make the backend to UI propagation work at all again. But then it works right. Change-Id: I31d7f247203cf25b17d06d0eb4edc7af81af4334 Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
Diffstat (limited to 'imports')
-rw-r--r--imports/shared/service/climate/ClimateService.qml5
1 files changed, 5 insertions, 0 deletions
diff --git a/imports/shared/service/climate/ClimateService.qml b/imports/shared/service/climate/ClimateService.qml
index 6d7a3cd..869b20c 100644
--- a/imports/shared/service/climate/ClimateService.qml
+++ b/imports/shared/service/climate/ClimateService.qml
@@ -127,7 +127,12 @@ QtObject {
property int ventilation: climateControl.fanSpeedLevel.value
property string tempSuffix: SettingsService.metric ? "°C" : "°F"
property int ventilationLevels: 7 // 6 + off (0)
+
onVentilationChanged: climateControl.fanSpeedLevel.value = ventilation
+ property Connections fanSpeedLevelConnections: Connections {
+ target: climateControl.fanSpeedLevel
+ onValueChanged: ventilation = climateControl.fanSpeedLevel.value
+ }
property QtObject stateMachine: ClimateStateMachine {
climateControl: root.climateControl