From 652a74c3aef0f0d3d45c047208221321f4446297 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sun, 29 Sep 2013 08:01:19 -0400 Subject: [PATCH] Fix filename and directory in the GCode save dialog being flipped. (.gcode was being added to the directory) --- Cura/gui/sceneView.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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() -- 2.30.2