Skip to content

Commit 255df0f

Browse files
committed
feat(parameter editor): only present Skip button if no FC is connected
Only present Upload button if FC is connected
1 parent 1bfd319 commit 255df0f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,8 @@ def __create_parameter_area_widgets(self) -> None:
351351
command=self.on_upload_selected_click,
352352
)
353353
upload_selected_button.configure(state="normal" if self.flight_controller.master else "disabled")
354-
upload_selected_button.pack(side=tk.LEFT, padx=(8, 8)) # Add padding on both sides of the upload selected button
354+
if self.gui_complexity != "simple" or self.flight_controller.master:
355+
upload_selected_button.pack(side=tk.LEFT, padx=(8, 8)) # Add padding on both sides of the upload selected button
355356
show_tooltip(
356357
upload_selected_button,
357358
_(
@@ -365,7 +366,8 @@ def __create_parameter_area_widgets(self) -> None:
365366

366367
# Create skip button
367368
skip_button = ttk.Button(buttons_frame, text=_("Skip parameter file"), command=self.on_skip_click)
368-
skip_button.pack(side=tk.RIGHT, padx=(8, 8)) # Add right padding to the skip button
369+
if self.gui_complexity != "simple" or not self.flight_controller.master:
370+
skip_button.pack(side=tk.RIGHT, padx=(8, 8)) # Add right padding to the skip button
369371
show_tooltip(
370372
skip_button,
371373
_(

0 commit comments

Comments
 (0)