add select all and select none into export function
This commit is contained in:
parent
d06591ba57
commit
ea7aa5ab26
@ -180,8 +180,32 @@ class MainWindow(tk.Frame):
|
||||
tree_scrollbar = ttk.Scrollbar(results_frame, orient="vertical", command=self.flight_timeline_tree.yview)
|
||||
self.flight_timeline_tree.configure(yscrollcommand=tree_scrollbar.set)
|
||||
tree_scrollbar.grid(row=0, column=1, sticky="ns")
|
||||
self.export_segment_button = ttk.Button(results_frame, text="Export Selected Segment(s)", state=tk.DISABLED, command=self.controller.start_segment_export)
|
||||
self.export_segment_button.grid(row=1, column=0, columnspan=2, pady=5)
|
||||
buttons_frame = ttk.Frame(results_frame)
|
||||
buttons_frame.grid(row=1, column=0, columnspan=2, sticky="ew", pady=5)
|
||||
|
||||
# Pulsanti di selezione
|
||||
select_all_button = ttk.Button(buttons_frame, text="Select All", command=self._select_all_segments)
|
||||
select_all_button.pack(side=tk.LEFT, padx=(0, 5))
|
||||
|
||||
deselect_all_button = ttk.Button(buttons_frame, text="Select None", command=self._deselect_all_segments)
|
||||
deselect_all_button.pack(side=tk.LEFT)
|
||||
|
||||
# Sposta il pulsante di esportazione in questo frame per allinearlo
|
||||
self.export_segment_button = ttk.Button(
|
||||
buttons_frame, text="Export Selected Segment(s)", state=tk.DISABLED,
|
||||
command=self.controller.start_segment_export
|
||||
)
|
||||
# Lo mettiamo a destra per separarlo
|
||||
self.export_segment_button.pack(side=tk.RIGHT)
|
||||
|
||||
def _select_all_segments(self):
|
||||
"""Selects all items in the flight timeline treeview."""
|
||||
children = self.flight_timeline_tree.get_children()
|
||||
self.flight_timeline_tree.selection_set(children)
|
||||
|
||||
def _deselect_all_segments(self):
|
||||
"""Deselects all items in the flight timeline treeview."""
|
||||
self.flight_timeline_tree.selection_remove(self.flight_timeline_tree.selection())
|
||||
|
||||
def _create_out_processor_tab(self, parent):
|
||||
parent.columnconfigure(1, weight=1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user