From 0e0de71ede2bd5c2262b89a73f2eac55c48a3344 Mon Sep 17 00:00:00 2001
From: Jdrezen <jeremie.drezen@gmail.com>
Date: Fri, 21 May 2021 14:08:03 +0200
Subject: [PATCH] =?UTF-8?q?Ajout=20de=20test=20si=20le=20nom=20de=20fichie?=
 =?UTF-8?q?r=20est=20vide=20pour=20la=20sauvegarde=20de=20l'=C3=A9tat?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 pyAmakIHM/classes/controleur.py | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/pyAmakIHM/classes/controleur.py b/pyAmakIHM/classes/controleur.py
index bf42f6f..2551239 100644
--- a/pyAmakIHM/classes/controleur.py
+++ b/pyAmakIHM/classes/controleur.py
@@ -235,11 +235,11 @@ class Controleur:
             self.__scheduler.start()
 
     """
-    Save the current state
+    Save the current state in the given file
     """
     def updateSave(self, filename : str) -> None:
-        if not (filename is None):
-            self.__scheduler.save()
+        if filename != '':
+            self.__scheduler.save(filename)
 
     def updateCycle(self) -> None:
         try:
@@ -247,14 +247,14 @@ class Controleur:
         except:
             return
 
-    def updateWindow(self):
+    def updateWindow(self) -> None:
         pass
 
     def initialisation(self) -> None:
         pass
 
     """
-    Launch the amas in a thread and display the window
+    Launch the scheduler in a thread and display the window
     """
     def start(self) -> None:
         self.initialisation()
@@ -262,7 +262,10 @@ class Controleur:
         self.__th.start()
         self.__fenetre.display()
 
-    def updateClosing(self):
+    """
+    Close the scheduler
+    """
+    def updateClosing(self) -> None:
         self.__scheduler.exit_program()
 
 
-- 
GitLab