Commit 70ca8ace authored by Spencer Bliven's avatar Spencer Bliven

Setting BufferedCanvas sizes at creation.

This fixes bug #359
parent b77ce7a2
......@@ -23,14 +23,13 @@ class Graph(BufferedCanvas):
'''A class to show a Graph with Pronterface.'''
def __init__(self, parent, id, pos = wx.DefaultPosition,
size = wx.DefaultSize, style = 0):
size = wx.Size(150, 80), style = 0):
# Forcing a no full repaint to stop flickering
style = style | wx.NO_FULL_REPAINT_ON_RESIZE
#call super function
#super(Graph, self).__init__(parent, id, pos, size, style)
BufferedCanvas.__init__(self, parent, id)
super(Graph, self).__init__(parent, id, pos, size, style)
#BufferedCanvas.__init__(self, parent, id)
self.SetSize(wx.Size(150, 80))
self.extruder0temps = [0]
self.extruder0targettemps = [0]
......
......@@ -60,8 +60,7 @@ class XYButtons(BufferedCanvas):
self.bgcolor.SetFromName(bgcolor)
self.bgcolormask = wx.Colour(self.bgcolor.Red(), self.bgcolor.Green(), self.bgcolor.Blue(), 128)
BufferedCanvas.__init__(self, parent, ID)
self.SetSize(self.bg_bmp.GetSize())
BufferedCanvas.__init__(self, parent, ID, size=self.bg_bmp.GetSize())
# Set up mouse and keyboard event capture
self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
......
......@@ -46,9 +46,7 @@ class ZButtons(BufferedCanvas):
self.bgcolor.SetFromName(bgcolor)
self.bgcolormask = wx.Colour(self.bgcolor.Red(), self.bgcolor.Green(), self.bgcolor.Blue(), 128)
BufferedCanvas.__init__(self, parent, ID)
self.SetSize(wx.Size(59, 244))
BufferedCanvas.__init__(self, parent, ID, size=wx.Size(59, 244))
# Set up mouse and keyboard event capture
self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment