From: Daid Date: Fri, 22 Jun 2012 04:53:18 +0000 (+0200) Subject: Fixed #135 - Update preview window controls when loading a new profile. X-Git-Tag: 12.07~34 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=bcabc0d96ae6d5a83e48f6ef8ce811690abf3c75;p=cura.git Fixed #135 - Update preview window controls when loading a new profile. --- diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index 34b84262..fc2b92ee 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -390,3 +390,6 @@ class mainWindow(configBase.configWindowBase): profile.saveGlobalProfile(profile.getDefaultProfilePath()) self.Destroy() + def updateProfileToControls(self): + super(mainWindow, self).updateProfileToControls() + self.preview3d.updateProfileToControls() diff --git a/Cura/gui/preview3d.py b/Cura/gui/preview3d.py index 6eb6334e..436ca81e 100644 --- a/Cura/gui/preview3d.py +++ b/Cura/gui/preview3d.py @@ -326,6 +326,16 @@ class previewPanel(wx.Panel): obj.mesh.getMinimumZ() obj.dirty = True self.glCanvas.Refresh() + + def updateProfileToControls(self): + self.scale.SetValue(profile.getProfileSetting('model_scale')) + self.rotate.SetValue(profile.getProfileSettingFloat('model_rotate_base')) + self.mirrorX.SetValue(profile.getProfileSetting('flip_x') == 'True') + self.mirrorY.SetValue(profile.getProfileSetting('flip_y') == 'True') + self.mirrorZ.SetValue(profile.getProfileSetting('flip_z') == 'True') + self.swapXZ.SetValue(profile.getProfileSetting('swap_xz') == 'True') + self.swapYZ.SetValue(profile.getProfileSetting('swap_yz') == 'True') + self.updateModelTransform() class PreviewGLCanvas(glcanvas.GLCanvas): def __init__(self, parent):