X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe295b0d3e61c2b32079d886f5109fe825d14eb8..38b36b4c679d20adb70d1695f3be9b801fdbf556:/wxPython/wx/tools/XRCed/panel.py diff --git a/wxPython/wx/tools/XRCed/panel.py b/wxPython/wx/tools/XRCed/panel.py index 43fe83d6ad..d05dc3793c 100644 --- a/wxPython/wx/tools/XRCed/panel.py +++ b/wxPython/wx/tools/XRCed/panel.py @@ -160,6 +160,7 @@ class Panel(wx.Notebook): # Register undo object when modifying first time if not self.modified and value: g.undoMan.RegisterUndo(UndoEdit()) + g.frame.SetModified() self.modified = value def Apply(self): @@ -241,7 +242,7 @@ class ParamPage(wx.Panel): # Save current state def SaveState(self): self.origChecks = map(lambda i: (i[0], i[1].GetValue()), self.checks.items()) - self.origControls = map(lambda i: (i[0], i[1].GetValue(), i[1].IsEnabled()), + self.origControls = map(lambda i: (i[0], i[1].GetValue(), i[1].enabled), self.controls.items()) if self.controlName: self.origName = self.controlName.GetValue() @@ -258,7 +259,8 @@ class ParamPage(wx.Panel): for k,v,e in state[1]: self.controls[k].SetValue(v) self.controls[k].Enable(e) - if e: self.controls[k].modified = True + # Set all states to modified + if e and k in self.xxx.params: self.controls[k].modified = True if self.controlName: self.controlName.SetValue(state[2]) @@ -290,8 +292,9 @@ class PropPage(ParamPage): label = wx.StaticText(self, paramIDs[param], param + ':', size = (LABEL_WIDTH,-1), name = param) else: - # Notebook has one very loooooong parameter + # Rename some parameters if param == 'usenotebooksizer': sParam = 'usesizer:' + elif param == 'option': sParam = 'proportion' else: sParam = param + ':' label = wx.CheckBox(self, paramIDs[param], sParam, size = (LABEL_WIDTH,-1), name = param)