fix, option editor was not updating edited value on cancel event

This commit is contained in:
Basile Burg 2015-02-22 12:27:57 +01:00
parent 5b9743bcf3
commit faecac4b3a
1 changed files with 4 additions and 3 deletions

View File

@ -155,12 +155,11 @@ begin
if selCat.Selected = nil then exit;
if selcat.Selected.Data = nil then exit;
//
if inspector.Parent <> nil then
inspector.ItemIndex := -1;
PCategoryData(selCat.Selected.Data)^
.observer
.optionedEvent(oeeCancel);
//
// if generic editor then
// refresh displayed value since the provider may have updated the options container
end;
procedure TCEOptionEditorWidget.btnAcceptClick(Sender: TObject);
@ -168,6 +167,8 @@ begin
if selCat.Selected = nil then exit;
if selcat.Selected.Data = nil then exit;
//
if inspector.Parent <> nil then
inspector.ItemIndex := -1;
PCategoryData(selCat.Selected.Data)^
.observer
.optionedEvent(oeeAccept);