Fixed bug in graph panel default size in DebugVariablePanel
authorLaurent Bessard
Fri, 19 Apr 2013 00:24:15 +0200
changeset 1043 b46e45e0afc7
parent 1042 6dbdc6844eb9
child 1044 41bd726aa23c
Fixed bug in graph panel default size in DebugVariablePanel
controls/DebugVariablePanel.py
--- a/controls/DebugVariablePanel.py	Thu Apr 18 21:30:20 2013 +0200
+++ b/controls/DebugVariablePanel.py	Fri Apr 19 00:24:15 2013 +0200
@@ -818,7 +818,8 @@
             self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
             self.Bind(wx.EVT_SIZE, self.OnResize)
             
-            self.SetMinSize(self.GetCanvasMinSize())
+            canvas_size = self.GetCanvasMinSize()
+            self.SetMinSize(canvas_size)
             self.SetDropTarget(DebugVariableDropTarget(self.ParentWindow, self))
             self.mpl_connect('button_press_event', self.OnCanvasButtonPressed)
             self.mpl_connect('motion_notify_event', self.OnCanvasMotion)
@@ -834,7 +835,7 @@
                 GraphButton(0, 0, GetBitmap("delete_graph"), self.OnCloseButton))
             
             self.ResetGraphics()
-            self.RefreshLabelsPosition(200)
+            self.RefreshLabelsPosition(canvas_size.height)
             self.ShowButtons(False)
         
         def draw(self, drawDC=None):