Add sessions

This commit is contained in:
2023-06-02 12:21:12 +02:00
parent e2546c7bfb
commit a149ab71bb
5 changed files with 30 additions and 5 deletions

View File

@@ -32,6 +32,9 @@ class SessionWindow:
self.list_in_session = []
def open(self):
list = Config._CONFIG['session']
if list:
self.list_in_session = [DrawingElement(e) for e in list]
self.update_session_list()
def update_session_list(self):
@@ -155,6 +158,7 @@ class SessionWindow:
self.window.destroy()
def save_session(self):
Config._CONFIG['session'] = []
for element in self.list_in_session:
Config._CONFIG['session'].append(element.__dict__)
Config.save()