There can be only ONE ...GraphFrame

This commit is contained in:
HomeWorld
2010-11-11 18:06:28 +02:00
parent d41dfc3266
commit 031708d9e6

View File

@@ -116,6 +116,8 @@ class MainFrame(wx.Frame):
self.addTabId = wx.NewId()
self.closeTabId = wx.NewId()
self.graphFrame = None
#Add menu
self.SetMenuBar(MainMenuBar())
#self.SetToolBar(MainToolBar(self))
@@ -351,8 +353,11 @@ class MainFrame(wx.Frame):
self.waitDialog.Destroy()
def openGraphFrame(self, event):
graphFrame = GraphFrame(self)
graphFrame.Show()
if not self.graphFrame:
self.graphFrame = GraphFrame(self)
self.graphFrame.Show()
else:
self.graphFrame.SetFocus()
def toggleShipBrowser(self, event):
self.GetToolBar().toggleShipBrowser(event)