Commit bf77d84f authored by Guillaume Seguin's avatar Guillaume Seguin

Propagate build dimensions to plater

parent 61853850
...@@ -236,7 +236,7 @@ class showstl(wx.Window): ...@@ -236,7 +236,7 @@ class showstl(wx.Window):
del dc del dc
class stlwin(wx.Frame): class stlwin(wx.Frame):
def __init__(self, filenames = [], size = (800, 580), callback = None, parent = None): def __init__(self, filenames = [], size = (800, 580), callback = None, parent = None, build_dimensions = None):
wx.Frame.__init__(self, parent, title = _("Plate building tool"), size = size) wx.Frame.__init__(self, parent, title = _("Plate building tool"), size = size)
self.filenames = filenames self.filenames = filenames
if hasattr(sys,"frozen") and sys.frozen=="windows_exe": if hasattr(sys,"frozen") and sys.frozen=="windows_exe":
...@@ -275,7 +275,7 @@ class stlwin(wx.Frame): ...@@ -275,7 +275,7 @@ class stlwin(wx.Frame):
self.mainsizer.Add(self.panel) self.mainsizer.Add(self.panel)
#self.mainsizer.AddSpacer(10) #self.mainsizer.AddSpacer(10)
if glview: if glview:
self.s = stlview.StlViewPanel(self, (580, 580)) self.s = stlview.StlViewPanel(self, (580, 580), build_dimensions = build_dimensions)
else: else:
self.s = showstl(self, (580, 580), (0, 0)) self.s = showstl(self, (580, 580), (0, 0))
self.mainsizer.Add(self.s, 1, wx.EXPAND) self.mainsizer.Add(self.s, 1, wx.EXPAND)
......
...@@ -705,11 +705,11 @@ class PronterWindow(MainWindow, pronsole.pronsole): ...@@ -705,11 +705,11 @@ class PronterWindow(MainWindow, pronsole.pronsole):
def plate(self, e): def plate(self, e):
import plater import plater
print "plate function activated" print _("Plate function activated")
plater.stlwin(size = (800, 580), callback = self.platecb, parent = self).Show() plater.stlwin(size = (800, 580), callback = self.platecb, parent = self, build_dimensions = self.build_dimensions_list).Show()
def platecb(self, name): def platecb(self, name):
print "plated: "+name print _("Plated %s") % name
self.loadfile(None, name) self.loadfile(None, name)
def sdmenu(self, e): def sdmenu(self, e):
......
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