From 11db353ea4cac33caccb005be7d4b72671f20ad9 Mon Sep 17 00:00:00 2001 From: Louie S Date: Sat, 16 Sep 2023 09:36:14 -0400 Subject: removing (hiding) groups working --- assignment-list.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'assignment-list.py') diff --git a/assignment-list.py b/assignment-list.py index a09a448..7b9762c 100755 --- a/assignment-list.py +++ b/assignment-list.py @@ -98,6 +98,7 @@ class AssignmentList(QMainWindow): """ # TODO might want to add a warning # TODO might want to make part of the a destructor in the Group class + DB.removeGroup(id) Globals.entries = list(filter(lambda e: e.parent_id != id, Globals.entries)) Globals.groups = list(filter(lambda g: g.id != id, Globals.groups)) self.drawGroups() @@ -138,6 +139,10 @@ class AssignmentList(QMainWindow): column_right = QVBoxLayout() for g in Globals.groups: + # skip if this group is set to hidden + if g.hidden: + continue + # Include buttons at the bottom to edit the group g_layout = g.buildLayout() buttons_hbox = QHBoxLayout() -- cgit