fix problem with hidden FindInPou dialog with wxPython 3.0 on Windows
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 20 Jun 2017 18:57:29 +0300
changeset 1700 df50e13a94d6
parent 1699 65ce8afe4b8f
child 1701 8337f6c169d0
fix problem with hidden FindInPou dialog with wxPython 3.0 on Windows

FindInPou.IsShown() returned True, but dialog was hidden.
At same time On GNU/Linux with wxPython 3.0 there wasn't such problem.
So it's Windows specific.
IDEFrame.py
--- a/IDEFrame.py	Tue Jun 20 17:01:19 2017 +0300
+++ b/IDEFrame.py	Tue Jun 20 18:57:29 2017 +0300
@@ -641,8 +641,6 @@
 
         self.AUIManager.Update()
 
-        self.FindDialog = FindInPouDialog(self)
-        self.FindDialog.Hide()
 
     ## Constructor of the PLCOpenEditor class.
     #  @param parent The parent window.
@@ -731,9 +729,15 @@
         self.SetRefreshFunctions()
         self.SetDeleteFunctions()
 
+        wx.CallAfter(self.InitFindDialog)
+
     def __del__(self):
         self.FindDialog.Destroy()
 
+    def InitFindDialog(self):
+        self.FindDialog = FindInPouDialog(self)
+        self.FindDialog.Hide()
+
     def Show(self):
         wx.Frame.Show(self)
         wx.CallAfter(self.RestoreLastState)