1404 def RefreshTabCtrlEvent(self): |
1404 def RefreshTabCtrlEvent(self): |
1405 auitabctrl = [] |
1405 auitabctrl = [] |
1406 for child in self.TabsOpened.GetChildren(): |
1406 for child in self.TabsOpened.GetChildren(): |
1407 if isinstance(child, wx.aui.AuiTabCtrl): |
1407 if isinstance(child, wx.aui.AuiTabCtrl): |
1408 auitabctrl.append(child) |
1408 auitabctrl.append(child) |
1409 if wx.VERSION > (4, 1, 0) and child not in self.AuiTabCtrl: |
1409 if wx.VERSION >= (4, 1, 0) and child not in self.AuiTabCtrl: |
1410 child.Bind(wx.EVT_LEFT_DCLICK, self.GetTabsOpenedDClickFunction(child)) |
1410 child.Bind(wx.EVT_LEFT_DCLICK, self.GetTabsOpenedDClickFunction(child)) |
1411 self.AuiTabCtrl = auitabctrl |
1411 self.AuiTabCtrl = auitabctrl |
1412 # on wxPython 4.0.7, AuiManager has no "RestorePane" method... |
1412 # on wxPython 4.0.7, AuiManager has no "RestorePane" method... |
1413 if wx.VERSION > (4, 1, 0) and self.TabsOpened.GetPageCount() == 0: |
1413 if wx.VERSION >= (4, 1, 0) and self.TabsOpened.GetPageCount() == 0: |
1414 pane = self.AUIManager.GetPane(self.TabsOpened) |
1414 pane = self.AUIManager.GetPane(self.TabsOpened) |
1415 # on wxPython 4.1.0, AuiPaneInfo has no "IsMaximized" attribute... |
1415 # on wxPython 4.1.0, AuiPaneInfo has no "IsMaximized" attribute... |
1416 if (not hasattr(pane, "IsMaximized")) or pane.IsMaximized(): |
1416 if (not hasattr(pane, "IsMaximized")) or pane.IsMaximized(): |
1417 self.AUIManager.RestorePane(pane) |
1417 self.AUIManager.RestorePane(pane) |
1418 self.AUIManager.Update() |
1418 self.AUIManager.Update() |