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
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