Commit cac4a96f authored by kliment's avatar kliment

Do not change directory on load

parent 49febd96
...@@ -479,7 +479,12 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -479,7 +479,12 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
thread(target=self.skein_monitor).start() thread(target=self.skein_monitor).start()
def loadfile(self,event): def loadfile(self,event):
dlg=wx.FileDialog(self,"Open file to print",style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST|wx.FD_CHANGE_DIR) basedir="."
try:
basedir=os.path.split(self.filename)[0]
except:
pass
dlg=wx.FileDialog(self,"Open file to print",basedir,style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST)
dlg.SetWildcard("STL and GCODE files (;*.gcode;*.g;*.stl;)") dlg.SetWildcard("STL and GCODE files (;*.gcode;*.g;*.stl;)")
if(dlg.ShowModal() == wx.ID_OK): if(dlg.ShowModal() == wx.ID_OK):
name=dlg.GetPath() name=dlg.GetPath()
......
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