Fixed #135 - Update preview window controls when loading a new profile.

master
Daid 2012-06-22 06:53:18 +02:00
parent 22042b9f8b
commit bcabc0d96a
2 changed files with 13 additions and 0 deletions

View File

@ -390,3 +390,6 @@ class mainWindow(configBase.configWindowBase):
profile.saveGlobalProfile(profile.getDefaultProfilePath())
self.Destroy()
def updateProfileToControls(self):
super(mainWindow, self).updateProfileToControls()
self.preview3d.updateProfileToControls()

View File

@ -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):