diff --git a/gui/graphFrame/frame.py b/gui/graphFrame/frame.py index bd232fc1c..e15b3a64b 100644 --- a/gui/graphFrame/frame.py +++ b/gui/graphFrame/frame.py @@ -113,7 +113,7 @@ class GraphFrame(wx.Frame): for view in Graph.views: self.graphSelection.Append(view.name, view()) self.graphSelection.SetSelection(0) - self.ctrlPanel.updateControls() + self.ctrlPanel.updateControls(layout=False) # Event bindings - local events self.Bind(wx.EVT_CLOSE, self.closeEvent) @@ -123,8 +123,9 @@ class GraphFrame(wx.Frame): from gui.builtinStatsViews.resistancesViewFull import EFFECTIVE_HP_TOGGLED # Grr crclar gons self.mainFrame.Bind(EFFECTIVE_HP_TOGGLED, self.OnEhpToggled) - self.draw() + self.Layout() self.UpdateWindowSize() + self.draw() def UpdateWindowSize(self): curW, curH = self.GetSize() diff --git a/gui/graphFrame/panel.py b/gui/graphFrame/panel.py index a283efe42..1ffdf5b7c 100644 --- a/gui/graphFrame/panel.py +++ b/gui/graphFrame/panel.py @@ -97,7 +97,7 @@ class GraphControlPanel(wx.Panel): self.drawTimer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self.OnDrawTimer, self.drawTimer) - def updateControls(self): + def updateControls(self, layout=True): view = self.graphFrame.getView() self.ySubSelection.Clear() self.xSubSelection.Clear() @@ -127,9 +127,12 @@ class GraphControlPanel(wx.Panel): # Target list self.targetList.Show(view.hasTargets) + # Inputs self.updateInputs() - self.graphFrame.Layout() - self.graphFrame.UpdateWindowSize() + + if layout: + self.graphFrame.Layout() + self.graphFrame.UpdateWindowSize() def updateInputs(self): # Clean up old inputs