less pain

This commit is contained in:
2026-05-10 18:53:35 -04:00
parent e42db60299
commit 8715776ee4
2 changed files with 32 additions and 10 deletions
+31 -9
View File
@@ -905,11 +905,25 @@ class App:
imgui.table_set_column_index(1) imgui.table_set_column_index(1)
imgui.text(f_item.path if hasattr(f_item, 'path') else str(f_item)) imgui.text(f_item.path if hasattr(f_item, 'path') else str(f_item))
imgui.table_set_column_index(2) imgui.table_set_column_index(2)
if hasattr(f_item, 'auto_aggregate'): if f_item.auto_aggregate:
changed_agg, f_item.auto_aggregate = imgui.checkbox(f"##agg{i}", 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) imgui.table_set_column_index(3)
if hasattr(f_item, 'force_full'): if f_item.force_full:
changed_full, f_item.force_full = imgui.checkbox(f"##full{i}", 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) imgui.table_set_column_index(4)
fpath = f_item.path if hasattr(f_item, 'path') else str(f_item) 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', [])) is_cached = any(fpath in c for c in getattr(self, '_cached_files', []))
@@ -930,17 +944,25 @@ class App:
for f in self.files: for f in self.files:
f.selected = True f.selected = True
imgui.same_line() imgui.same_line()
if imgui.button("Agg Selected##aggsel"): if imgui.button("None##nonesel"):
for f in self.files: 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.auto_aggregate = True
f.force_full = False
imgui.same_line() imgui.same_line()
if imgui.button("Full Selected##fullsel"): if imgui.button("Full##fullsel"):
for f in self.files: for f in self.files:
if f.selected and hasattr(f, 'force_full'): if f.selected:
f.force_full = True f.force_full = True
f.auto_aggregate = False
imgui.same_line() 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] self.files = [f for f in self.files if not f.selected]
imgui.end_child() imgui.end_child()
imgui.separator() imgui.separator()
+1 -1
View File
@@ -493,7 +493,7 @@ class TrackState:
@dataclass @dataclass
class FileItem: class FileItem:
path: str path: str
auto_aggregate: bool = True auto_aggregate: bool = False
force_full: bool = False force_full: bool = False
selected: bool = False selected: bool = False
ast_signatures: bool = False ast_signatures: bool = False