chiark / gitweb /
Fix SD card selection.
authordaid303 <daid303@gmail.com>
Fri, 19 Apr 2013 10:16:16 +0000 (12:16 +0200)
committerdaid303 <daid303@gmail.com>
Fri, 19 Apr 2013 10:16:16 +0000 (12:16 +0200)
Cura/gui/sceneView.py

index 374a001657aaa0c68eae293818627161808d2384..7df5dc1f170b37e808742c3964668c262ba6238c 100644 (file)
@@ -131,7 +131,7 @@ class SceneView(openglGui.glGuiPanel):
                        elif len(removableStorage.getPossibleSDcardDrives()) > 0:
                                drives = removableStorage.getPossibleSDcardDrives()
                                if len(drives) > 1:
-                                       dlg = wx.SingleChoiceDialog(self, "Select SD drive", "Multiple removable drives have been found,\nplease select your SD card drive", drives)
+                                       dlg = wx.SingleChoiceDialog(self, "Select SD drive", "Multiple removable drives have been found,\nplease select your SD card drive", map(lambda n: n[0], drives))
                                        if dlg.ShowModal() != wx.ID_OK:
                                                dlg.Destroy()
                                                return
@@ -142,11 +142,11 @@ class SceneView(openglGui.glGuiPanel):
                                filename = os.path.basename(profile.getPreference('lastFile'))
                                filename = filename[0:filename.rfind('.')] + '.gcode'
                                try:
-                                       shutil.copy(self._slicer.getGCodeFilename(), drive + filename)
+                                       shutil.copy(self._slicer.getGCodeFilename(), drive[1] + filename)
                                except:
                                        self.notification.message("Failed to save to SD card")
                                else:
-                                       self.notification.message("Saved as %s" % (drive + filename))
+                                       self.notification.message("Saved as %s" % (drive[1] + filename))
                        else:
                                self._showSaveGCode()
                if button == 3: