Revert partly "Add HookGetCheckboxForBoolean handler in OI only once."

This reverts partly commit 943e4e4ff7.

(cherry picked from commit 45a590ed0b)
This commit is contained in:
Basile Burg 2021-09-26 16:28:56 +02:00 committed by Maxim Ganetsky
parent ca16e51245
commit feb2cb481c

View File

@ -1385,6 +1385,7 @@ procedure TOICustomPropertyGrid.SetPropertyEditorHook(
begin
if FPropertyEditorHook=NewPropertyEditorHook then exit;
FPropertyEditorHook:=NewPropertyEditorHook;
FPropertyEditorHook.AddHandlerGetCheckboxForBoolean(@HookGetCheckboxForBoolean);
IncreaseChangeStep;
SetSelection(FSelection);
end;
@ -4512,12 +4513,7 @@ begin
Selection := nil;
for Page:=Low(TObjectInspectorPage) to High(TObjectInspectorPage) do
if GridControl[Page]<>nil then
begin
if Page=oipgpProperties then // Add HookGetCheckboxForBoolean only once.
FPropertyEditorHook.AddHandlerGetCheckboxForBoolean(
@GridControl[Page].HookGetCheckboxForBoolean);
GridControl[Page].PropertyEditorHook:=FPropertyEditorHook;
end;
OldSelection:=TPersistentSelectionList.Create;
try
FPropertyEditorHook.GetSelection(OldSelection);