# 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):
# 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()
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])
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)