Bug when asking two consecutive times 'Show' fixed
authorberem
Wed, 02 Dec 2009 10:24:09 +0100
changeset 445 1b1dc8ad2498
parent 444 8eb1186fc9cf
child 449 9d5036e86c3d
Bug when asking two consecutive times 'Show' fixed
LPCBeremiz.py
--- a/LPCBeremiz.py	Tue Dec 01 11:00:02 2009 +0100
+++ b/LPCBeremiz.py	Wed Dec 02 10:24:09 2009 +0100
@@ -688,9 +688,12 @@
     frame = LPCBeremiz(None, plugin_root=plugin_root, debug=False)
     plugin_root.SetAppFrame(frame, frame.Log)
     frame.Show()
+    frame.Raise()
     
     app.MainLoop()
 
+    frame = None
+
 class StdoutPseudoFile:
     """ Base class for file like objects to facilitate StdOut for the Shell."""
     def write(self, s, style = None):
@@ -744,8 +747,10 @@
             return self.Exit()
         
         def Show(self):
-            beremiz_thread=Thread(target=BeremizStartProc, args=[self.PluginRoot])
-            beremiz_thread.start()
+            global frame
+            if frame is None:
+                beremiz_thread=Thread(target=BeremizStartProc, args=[self.PluginRoot])
+                beremiz_thread.start()
         
         def Refresh(self):
             global frame