Fixing bug integrated plugin editors not closed when removing corresponding plugin
authorlaurent
Tue, 20 Dec 2011 23:37:26 +0100
changeset 611 9d24fa46523f
parent 610 430d029beed6
child 612 fdb9501e5cc8
Fixing bug integrated plugin editors not closed when removing corresponding plugin
PLCOpenEditor.py
--- a/PLCOpenEditor.py	Tue Dec 20 23:34:19 2011 +0100
+++ b/PLCOpenEditor.py	Tue Dec 20 23:37:26 2011 +0100
@@ -858,6 +858,17 @@
         self.TabsOpened.AddPage(window, text)
         self.RefreshTabCtrlEvent()
     
+    ## Function that add a tab in Notebook, calling refresh for tab DClick event
+    # for wx.aui.AUINotebook.
+    #  @param window Panel to display in tab.
+    #  @param text title for the tab ctrl.
+    def DeletePage(self, window):
+        for idx in xrange(self.TabsOpened.GetPageCount()):
+            if self.TabsOpened.GetPage(idx) == window:
+                self.TabsOpened.DeletePage(idx)
+                self.RefreshTabCtrlEvent()
+                return 
+        
     ## Function that fix difference in deleting all tabs between 
     # wx.Notebook and wx.aui.AUINotebook.
     def DeleteAllPages(self):