From: Adam Goldsmith Date: Sun, 29 Sep 2013 12:01:19 +0000 (-0400) Subject: Fix filename and directory in the GCode save dialog being flipped. (.gcode was being... X-Git-Tag: 13.10~36^2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=652a74c3aef0f0d3d45c047208221321f4446297;p=cura.git Fix filename and directory in the GCode save dialog being flipped. (.gcode was being added to the directory) --- diff --git a/Cura/gui/sceneView.py b/Cura/gui/sceneView.py index d81c6ba6..a8d17559 100644 --- a/Cura/gui/sceneView.py +++ b/Cura/gui/sceneView.py @@ -222,10 +222,8 @@ class SceneView(openglGui.glGuiPanel): self._slicer.submitSliceInfoOnline() def showSaveGCode(self): - defPath = profile.getPreference('lastFile') - defPath = defPath[0:defPath.rfind('.')] + '.gcode' - dlg=wx.FileDialog(self, _("Save toolpath"), defPath, style=wx.FD_SAVE) - dlg.SetFilename(self._scene._objectList[0].getName()) + dlg=wx.FileDialog(self, _("Save toolpath"), os.path.dirname(profile.getPreference('lastFile')), style=wx.FD_SAVE) + dlg.SetFilename(self._scene._objectList[0].getName()+'.gcode') dlg.SetWildcard('Toolpath (*.gcode)|*.gcode;*.g') if dlg.ShowModal() != wx.ID_OK: dlg.Destroy()