From bcabc0d96ae6d5a83e48f6ef8ce811690abf3c75 Mon Sep 17 00:00:00 2001 From: Daid Date: Fri, 22 Jun 2012 06:53:18 +0200 Subject: [PATCH] Fixed #135 - Update preview window controls when loading a new profile. --- Cura/gui/mainWindow.py | 3 +++ Cura/gui/preview3d.py | 10 ++++++++++ 2 files changed, 13 insertions(+) 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): -- 2.30.2