From b4025edf0ac5400d4dd8c418a9a156c44e9c67f8 Mon Sep 17 00:00:00 2001 From: Louie S Date: Sat, 16 Sep 2023 09:36:14 -0400 Subject: Saving and loading working for groups --- add_group_form.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'add_group_form.py') diff --git a/add_group_form.py b/add_group_form.py index e62b211..dc83b89 100644 --- a/add_group_form.py +++ b/add_group_form.py @@ -5,6 +5,7 @@ from PyQt5.QtCore import Qt from add_entry_form import Globals from group import Group +DB = __import__("db_sqlite") class addGroupForm(QDialog): """ @@ -65,9 +66,9 @@ class addGroupForm(QDialog): QMessageBox.Close) return + new_id = DB.insertGroup(Group(0, name_text, column_text, link_text)) # TODO do the database stuff (this will allow us to get the id) - Globals.groups.append(Group(Globals.max_group_id, name_text, column_text, link_text)) - Globals.max_group_id = Globals.max_group_id + 1 + Globals.groups.append(Group(new_id, name_text, column_text, link_text)) self.close() if __name__ == "__main__": -- cgit