diff --git a/src/gui_2.py b/src/gui_2.py index 6604926..e1d409b 100644 --- a/src/gui_2.py +++ b/src/gui_2.py @@ -905,11 +905,25 @@ class App: imgui.table_set_column_index(1) imgui.text(f_item.path if hasattr(f_item, 'path') else str(f_item)) imgui.table_set_column_index(2) - if hasattr(f_item, 'auto_aggregate'): - changed_agg, f_item.auto_aggregate = imgui.checkbox(f"##agg{i}", f_item.auto_aggregate) + if f_item.auto_aggregate: + imgui.text_colored(imgui.ImVec4(0.3, 0.8, 1, 1), "A") + else: + imgui.text_disabled(" ") + imgui.same_line(spacing=1) + if imgui.invisible_button(f"agg{i}", imgui.ImVec2(15, 15)): + f_item.auto_aggregate = not f_item.auto_aggregate + if f_item.auto_aggregate: + f_item.force_full = False imgui.table_set_column_index(3) - if hasattr(f_item, 'force_full'): - changed_full, f_item.force_full = imgui.checkbox(f"##full{i}", f_item.force_full) + if f_item.force_full: + imgui.text_colored(imgui.ImVec4(1, 0.6, 0.3, 1), "F") + else: + imgui.text_disabled(" ") + imgui.same_line(spacing=1) + if imgui.invisible_button(f"full{i}", imgui.ImVec2(15, 15)): + f_item.force_full = not f_item.force_full + if f_item.force_full: + f_item.auto_aggregate = False imgui.table_set_column_index(4) fpath = f_item.path if hasattr(f_item, 'path') else str(f_item) is_cached = any(fpath in c for c in getattr(self, '_cached_files', [])) @@ -930,17 +944,25 @@ class App: for f in self.files: f.selected = True imgui.same_line() - if imgui.button("Agg Selected##aggsel"): + if imgui.button("None##nonesel"): for f in self.files: - if f.selected and hasattr(f, 'auto_aggregate'): + if f.selected: + f.auto_aggregate = False + f.force_full = False + imgui.same_line() + if imgui.button("Agg##aggsel"): + for f in self.files: + if f.selected: f.auto_aggregate = True + f.force_full = False imgui.same_line() - if imgui.button("Full Selected##fullsel"): + if imgui.button("Full##fullsel"): for f in self.files: - if f.selected and hasattr(f, 'force_full'): + if f.selected: f.force_full = True + f.auto_aggregate = False imgui.same_line() - if imgui.button("Del Selected##dels"): + if imgui.button("Del##dels"): self.files = [f for f in self.files if not f.selected] imgui.end_child() imgui.separator() diff --git a/src/models.py b/src/models.py index 957ea82..b265274 100644 --- a/src/models.py +++ b/src/models.py @@ -493,7 +493,7 @@ class TrackState: @dataclass class FileItem: path: str - auto_aggregate: bool = True + auto_aggregate: bool = False force_full: bool = False selected: bool = False ast_signatures: bool = False