From f5cb5c399328397ce0948d3bb3b75d8fac4e38f5 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sat, 10 Aug 2019 11:23:01 +0300 Subject: [PATCH] Open only one window of attribute and character editors --- gui/mainFrame.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/mainFrame.py b/gui/mainFrame.py index 1eda49dad..e2996e977 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -212,6 +212,8 @@ class MainFrame(wx.Frame): self.registerMenu() # Internal vars to keep track of other windows (graphing/stats) + self.charEditor = None + self.attrEditor = None self.graphFrame = None self.tgtProfileEditor = None self.devTools = None @@ -391,12 +393,10 @@ class MainFrame(wx.Frame): self.bringUpWindow('devTools', DevTools) def OnShowCharacterEditor(self, event): - dlg = CharacterEditor(self) - dlg.Show() + self.bringUpWindow('charEditor', CharacterEditor) def OnShowAttrEditor(self, event): - frame = AttributeEditor(self) - frame.Show() + self.bringUpWindow('attrEditor', AttributeEditor) def OnShowTargetProfileEditor(self, event): self.ShowTargetProfileEditor()