Skip to content

Commit cc19e6c

Browse files
committed
fix(component editor): only refresh GUI if complexity changed
1 parent 477084d commit cc19e6c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ardupilot_methodic_configurator/frontend_tkinter_component_editor_base.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,11 @@ def _add_explanation_text(self, parent: ttk.Frame) -> None:
212212

213213
def _on_complexity_changed(self, _event: Optional[tk.Event] = None) -> None:
214214
"""Handle complexity combobox change."""
215-
# Save the complexity setting
216-
ProgramSettings.set_setting("gui_complexity", self.complexity_var.get())
217-
self._refresh_component_display()
215+
old_gui_complexity = ProgramSettings.get_setting("gui_complexity")
216+
new_gui_complexity = self.complexity_var.get()
217+
if new_gui_complexity != old_gui_complexity:
218+
ProgramSettings.set_setting("gui_complexity", new_gui_complexity)
219+
self._refresh_component_display()
218220

219221
def _refresh_component_display(self) -> None:
220222
"""Refresh the component display UI."""

0 commit comments

Comments
 (0)