Skip to content

Commit

Permalink
Fix auto sleep enable when sleepAfter isn't changed.
Browse files Browse the repository at this point in the history
The value of sleepAfter needs to be updated when auto sleep is
enabled, otherwise it will remain zero and the checkbox setting will
not be saved.
  • Loading branch information
Nick committed Sep 28, 2021
1 parent 985414e commit 30255cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion applications/launcher/widgets/SettingsPopup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ Item {
BetterCheckBox {
tristate: false
checkState: controller.automaticSleep ? Qt.Checked : Qt.Unchecked
onClicked: controller.automaticSleep = this.checkState === Qt.Checked
onClicked: {
controller.automaticSleep = this.checkState === Qt.Checked
controller.sleepAfter = sleepAfterSpinBox.value
}
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
Layout.fillWidth: false
}
Expand Down

0 comments on commit 30255cb

Please sign in to comment.