Do not change directory on load
parent
49febd9631
commit
cac4a96f17
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue