Skip to content

Commit

Permalink
Fix "Limit system feed-in" checked status and on/off behavior
Browse files Browse the repository at this point in the history
The checked binding and onClicked handler must refer to the raw
maxFeedInPower.dataItem.value rather than maxFeedInPower.value, since
the latter may be modified by the min/max bounds.

Fixes #1877
  • Loading branch information
blammit committed Jan 24, 2025
1 parent c139d96 commit 59e1215
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pages/settings/PageSettingsHub4Feedin.qml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ Page {
//% "Limit system feed-in"
text: qsTrId("settings_ess_limit_system_feed_in")
preferredVisible: acFeedin.checked || feedInDc.checked
checked: maxFeedInPower.value >= 0
checked: maxFeedInPower.dataItem.value >= 0
onClicked: {
if (maxFeedInPower.value < 0) {
if (maxFeedInPower.dataItem.value < 0) {
maxFeedInPower.dataItem.setValue(1000)
} else if (maxFeedInPower.value >= 0) {
} else if (maxFeedInPower.dataItem.value >= 0) {
maxFeedInPower.dataItem.setValue(-1)
}
}
Expand Down

0 comments on commit 59e1215

Please sign in to comment.