mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-08-30 14:00:36 +00:00
Avoid doing non-trivial work in onCheckedChanged on settings page load
This commit is contained in:
@@ -685,6 +685,9 @@ Flickable {
|
||||
font.pointSize: 12
|
||||
checked: prefs.unsupportedFps
|
||||
onCheckedChanged: {
|
||||
// This is called on init, so only do the work if we've
|
||||
// actually changed the value.
|
||||
if (prefs.unsupportedFps != checked) {
|
||||
prefs.unsupportedFps = checked
|
||||
|
||||
// The selectable FPS values depend on whether
|
||||
@@ -692,6 +695,7 @@ Flickable {
|
||||
fpsComboBox.reinitialize()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
id: enableMdns
|
||||
@@ -699,6 +703,9 @@ Flickable {
|
||||
font.pointSize: 12
|
||||
checked: prefs.enableMdns
|
||||
onCheckedChanged: {
|
||||
// This is called on init, so only do the work if we've
|
||||
// actually changed the value.
|
||||
if (prefs.enableMdns != checked) {
|
||||
prefs.enableMdns = checked
|
||||
|
||||
// We must save the updated preference to ensure
|
||||
@@ -712,6 +719,7 @@ Flickable {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
id: quitAppAfter
|
||||
|
||||
Reference in New Issue
Block a user