Commit da03db5b authored by Guillaume Seguin's avatar Guillaume Seguin

Merge branch 'master' of github.com:kliment/Printrun

parents 44e8f055 e2b25795
...@@ -235,9 +235,17 @@ class StlPlater(Plater): ...@@ -235,9 +235,17 @@ class StlPlater(Plater):
def load_file(self, filename): def load_file(self, filename):
if filename.lower().endswith(".stl"): if filename.lower().endswith(".stl"):
try:
self.load_stl(filename) self.load_stl(filename)
except:
dlg = wx.MessageDialog(self, _("Loading STL file failed"), _("Error"),wx.OK)
dlg.ShowModal()
elif filename.lower().endswith(".scad"): elif filename.lower().endswith(".scad"):
try:
self.load_scad(filename) self.load_scad(filename)
except:
dlg = wx.MessageDialog(self, _("Loading OpenSCAD file failed"), _("Error"),wx.OK)
dlg.ShowModal()
def load_scad(self, name): def load_scad(self, name):
lf = open(name) lf = open(name)
......
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