handle option editor event selcat

This commit is contained in:
Basile Burg 2015-05-03 09:19:39 +02:00
parent e7420ebf98
commit 01cd367c0c
4 changed files with 20 additions and 3 deletions

View File

@ -89,6 +89,19 @@ begin
SaveToMaster;
fBackup.Clear;
DockMaster.SaveSettingsToConfig(fBackup);
end
// reload
else if anEvent = oeeSelectCat then
begin
fBackup.Clear;
DockMaster.SaveSettingsToConfig(fBackup);
LoadFromMaster;
end
//change
else
begin
SaveToMaster;
doChanged(nil);
end;
end;

View File

@ -316,10 +316,11 @@ begin
self.Assign(fBackup);
D2Syn.Assign(fBackup.fD2Syn);
TxtSyn.Assign(fBackup.fTxtSyn);
end;
end
// apply, if change/accept event
// to get a live preview
applyChangesFromSelf;
else if anEvent <> oeeSelectCat then
applyChangesFromSelf;
// new backup values based on accepted values.
if anEvent = oeeAccept then
begin

View File

@ -368,7 +368,7 @@ end;
procedure TCEMessagesWidget.optionedEvent(anEvent: TOptionEditorEvent);
begin
case anEvent of
oeeAccept:
oeeAccept, oeeSelectCat:
fOptionsBackup.assign(fOptions);
oeeCancel:
fOptions.assign(fOptionsBackup);

View File

@ -190,6 +190,9 @@ end;
procedure TCEShortcutEditor.optionedEvent(anEvent: TOptionEditorEvent);
begin
case anEvent of
oeeSelectCat: updateFromObservers;
end;
// TODO-cfeature: pass new shortcut to observer
end;
{$ENDREGION}