IDEFrame.py
changeset 999 cbab4c1635bd
parent 989 b24c11c93766
child 1010 44c3cafef436
--- a/IDEFrame.py	Sun Mar 24 23:54:50 2013 +0100
+++ b/IDEFrame.py	Tue Mar 26 00:03:57 2013 +0100
@@ -714,6 +714,13 @@
             wx.CallAfter(self._Refresh, TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU)
         event.Skip()
 
+    def SelectTab(self, tab):
+        for notebook in [self.LeftNoteBook, self.BottomNoteBook, self.RightNoteBook]:
+            idx = notebook.GetPageIndex(tab)
+            if idx != wx.NOT_FOUND:
+                notebook.SetSelection(idx)
+                return
+
 #-------------------------------------------------------------------------------
 #                Saving and restoring frame organization functions
 #-------------------------------------------------------------------------------
@@ -1234,7 +1241,7 @@
             result = self.Controler.SearchInProject(criteria)
             self.ClearSearchResults()
             self.SearchResultPanel.SetSearchResults(criteria, result)
-            self.BottomNoteBook.SetSelection(self.BottomNoteBook.GetPageIndex(self.SearchResultPanel))
+            self.SelectTab(self.SearchResultPanel)
             
 #-------------------------------------------------------------------------------
 #                             Display Menu Functions