From 528ede9f864a598f254ce12238b04e3ff49431be Mon Sep 17 00:00:00 2001
From: Jdrezen <jeremie.drezen@gmail.com>
Date: Wed, 12 May 2021 15:54:20 +0200
Subject: [PATCH] Fix du scale

---
 pyAmakIHM/classes/panelCommandes.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pyAmakIHM/classes/panelCommandes.py b/pyAmakIHM/classes/panelCommandes.py
index 60c0ade..b0c775f 100644
--- a/pyAmakIHM/classes/panelCommandes.py
+++ b/pyAmakIHM/classes/panelCommandes.py
@@ -27,9 +27,8 @@ class PanelCommandes(LabelFrame):
         frameBoutons = Frame(self)
         frameBoutons.pack(side='bottom',fill='x')
 
-        slider = Scale(frameBoutons,orient='horizontal',from_=1,to=10,command=self.notifyObserverAboutScale)
-        slider.set(10)
-        slider.pack(side='bottom',fill='x')
+        self.__slider = Scale(frameBoutons,orient='horizontal',from_=1,to=10,command=self.notifyObserverAboutScale)
+        self.__slider.pack(side='bottom',fill='x')
 
         bouttonPlus = Button(frameBoutons,text='+',command=self.plus)
         bouttonPlus.pack(side='right')
@@ -48,6 +47,7 @@ class PanelCommandes(LabelFrame):
     """
     def attach(self, observer : 'Controleur') -> None:
         self.__observer = observer
+        self.__slider.set(10)
 
     """
     Notify the observer that the Start.Stop button was pressed
-- 
GitLab