chiark / gitweb /
Add popups when copying files to the SD card, to indicate succes or failure. Still...
[cura.git] / Cura / gui / preview3d.py
index 54244dd0fb6b092d19a60aea975fe26eeac4fb63..4882df71042e41735e83fdd46bcb6db71ad76a21 100644 (file)
@@ -252,14 +252,6 @@ class previewPanel(wx.Panel):
                        if profile.getProfileSettingFloat('model_scale') != 1.0 or profile.getProfileSettingFloat('model_rotate_base') != 0 or profile.getProfileSetting('flip_x') != 'False' or profile.getProfileSetting('flip_y') != 'False' or profile.getProfileSetting('flip_z') != 'False' or profile.getProfileSetting('swap_xz') != 'False' or profile.getProfileSetting('swap_yz') != 'False':\r
                                self.ShowWarningPopup('Reset scale, rotation and mirror?', self.OnResetAll)\r
        \r
-       def ShowWarningPopup(self, text, callback):\r
-               self.warningPopup.text.SetLabel(text)\r
-               self.warningPopup.callback = callback\r
-               self.OnMove()\r
-               self.warningPopup.Show(True)\r
-               self.warningPopup.timer.Start(5000)\r
-\r
-       \r
        def loadReModelFiles(self, filelist):\r
                #Only load this again if the filename matches the file we have already loaded (for auto loading GCode after slicing)\r
                for idx in xrange(0, len(filelist)):\r
@@ -320,6 +312,19 @@ class previewPanel(wx.Panel):
                profile.putProfileSetting('swap_xz', 'False')\r
                profile.putProfileSetting('swap_yz', 'False')\r
                self.updateProfileToControls()\r
+\r
+       def ShowWarningPopup(self, text, callback = None):\r
+               self.warningPopup.text.SetLabel(text)\r
+               self.warningPopup.callback = callback\r
+               if callback == None:\r
+                       self.warningPopup.yesButton.Show(False)\r
+                       self.warningPopup.noButton.SetLabel('ok')\r
+               else:\r
+                       self.warningPopup.yesButton.Show(True)\r
+                       self.warningPopup.noButton.SetLabel('no')\r
+               self.OnMove()\r
+               self.warningPopup.Show(True)\r
+               self.warningPopup.timer.Start(5000)\r
        \r
        def OnWarningPopup(self, e):\r
                self.warningPopup.Show(False)\r