Commit 84b67969 authored by segfault's avatar segfault

Select the correct listboxrow when setting is loaded (refs: #17136)

parent 36f5fe4b
......@@ -208,6 +208,12 @@ class MACSpoofSettingUI(AdditionalSetting):
except SettingNotFoundError:
raise
# Select the correct listboxrow (used in the popover)
if value:
self.listbox_macspoof_controls.select_row(self.listboxrow_macspoof_on)
else:
self.listbox_macspoof_controls.select_row(self.listboxrow_macspoof_off)
if self.spoofing_enabled == value:
return False
......@@ -279,6 +285,14 @@ class NetworkSettingUI(AdditionalSetting):
except SettingNotFoundError:
raise
# Select the correct listboxrow (used in the popover)
if value == NETCONF_DIRECT:
self.listbox_network_controls.select_row(self.listboxrow_network_clear)
elif value == NETCONF_OBSTACLE:
self.listbox_network_controls.select_row(self.listboxrow_network_specific)
elif value == NETCONF_DISABLED:
self.listbox_network_controls.select_row(self.listboxrow_network_off)
if self.value == value:
return False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment