Fit add when no tabs available bug fix (create an empty tab first or we will end up with orphan fittingviews) / little cleanup in mainframe.py / added GetPageCount method to PFNotebook

This commit is contained in:
HomeWorld
2010-11-20 21:05:01 +02:00
parent c730e59840
commit afed4daf67
3 changed files with 7 additions and 8 deletions

View File

@@ -42,6 +42,8 @@ class FitSpawner(gui.multiSwitch.TabSpawner):
def fitSelected(self, event):
count = -1
if self.multiSwitch.GetPageCount() == 0:
self.multiSwitch.AddPage(wx.Panel(self.multiSwitch, size = (0,0)), "Empty Tab")
for index, page in enumerate(self.multiSwitch.pages):
try:
if page.activeFitID == event.fitID: