Patches from KevinO that work around issues where the widget isn't
fully created yet. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
4997d3014c
commit
da8d6ffa57
@ -799,7 +799,8 @@ class FloatCanvas(wx.Panel):
|
|||||||
self.StartMove = None
|
self.StartMove = None
|
||||||
self.PrevMoveBox = None
|
self.PrevMoveBox = None
|
||||||
# called just to make sure everything is initialized
|
# called just to make sure everything is initialized
|
||||||
self.OnSize(None)
|
if wx.Platform != "__WXMAC__":
|
||||||
|
self.OnSize(None)
|
||||||
|
|
||||||
|
|
||||||
def BuildToolbar(self):
|
def BuildToolbar(self):
|
||||||
|
@ -392,9 +392,6 @@ class PlotCanvas(wx.Window):
|
|||||||
|
|
||||||
self.SetBackgroundColour("white")
|
self.SetBackgroundColour("white")
|
||||||
|
|
||||||
self.Bind(wx.EVT_PAINT, self.OnPaint)
|
|
||||||
self.Bind(wx.EVT_SIZE, self.OnSize)
|
|
||||||
|
|
||||||
# Create some mouse events for zooming
|
# Create some mouse events for zooming
|
||||||
self.Bind(wx.EVT_LEFT_DOWN, self.OnMouseLeftDown)
|
self.Bind(wx.EVT_LEFT_DOWN, self.OnMouseLeftDown)
|
||||||
self.Bind(wx.EVT_LEFT_UP, self.OnMouseLeftUp)
|
self.Bind(wx.EVT_LEFT_UP, self.OnMouseLeftUp)
|
||||||
@ -439,10 +436,13 @@ class PlotCanvas(wx.Window):
|
|||||||
self._fontSizeTitle= 15
|
self._fontSizeTitle= 15
|
||||||
self._fontSizeLegend= 7
|
self._fontSizeLegend= 7
|
||||||
|
|
||||||
|
self.Bind(wx.EVT_PAINT, self.OnPaint)
|
||||||
|
self.Bind(wx.EVT_SIZE, self.OnSize)
|
||||||
# OnSize called to make sure the buffer is initialized.
|
# OnSize called to make sure the buffer is initialized.
|
||||||
# This might result in OnSize getting called twice on some
|
# This might result in OnSize getting called twice on some
|
||||||
# platforms at initialization, but little harm done.
|
# platforms at initialization, but little harm done.
|
||||||
self.OnSize(None) # sets the initial size based on client size
|
if wx.Platform != "__WXMAC__":
|
||||||
|
self.OnSize(None) # sets the initial size based on client size
|
||||||
|
|
||||||
|
|
||||||
# SaveFile
|
# SaveFile
|
||||||
|
Loading…
Reference in New Issue
Block a user