Skip to content

Commit

Permalink
IMPROVEMENT: Do not allow changing vehicle directory in the parameter…
Browse files Browse the repository at this point in the history
… editor GUI, it confuses users
  • Loading branch information
amilcarlucas committed May 11, 2024
1 parent 19dde42 commit 6b3b602
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions MethodicConfigurator/frontend_tkinter_directory_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ def __init__(self, parent, parent_frame, initialdir: str, label_text: str, # py
self.directory_entry.pack(side=tk.LEFT, fill="x", expand=True, anchor=tk.NW, pady=(4, 0))
show_tooltip(self.directory_entry, dir_tooltip)

# Create a button for directory selection
directory_selection_button = ttk.Button(directory_selection_subframe, text="...",
command=self.on_select_directory, width=2)
directory_selection_button.pack(side=tk.RIGHT, anchor=tk.NW)
show_tooltip(directory_selection_button, button_tooltip)
if button_tooltip:
# Create a button for directory selection
directory_selection_button = ttk.Button(directory_selection_subframe, text="...",
command=self.on_select_directory, width=2)
directory_selection_button.pack(side=tk.RIGHT, anchor=tk.NW)
show_tooltip(directory_selection_button, button_tooltip)

def on_select_directory(self):
# Open the directory selection dialog
Expand Down Expand Up @@ -139,7 +140,8 @@ def __init__(self, parent: tk, parent_frame: tk.Frame, # pylint: disable=too-ma
"Vehicle-specific directory containing the intermediate\n"
"parameter files to be written to the flight controller",
"Select the vehicle-specific directory containing the\n"
"intermediate parameter files to be written to the flight controller")
"intermediate parameter files to be written to the flight controller" \
if destroy_parent_on_open else '')
self.local_filesystem = local_filesystem
self.destroy_parent_on_open = destroy_parent_on_open

Expand Down

0 comments on commit 6b3b602

Please sign in to comment.