Fix unwanted disabling of TMenuItem.Action in the designer. Issue #41109.

This commit is contained in:
Bart 2024-09-03 23:23:08 +02:00
parent 35c1846863
commit 93af67085a

View File

@ -433,7 +433,8 @@ var
begin begin
if FItems = nil then if FItems = nil then
Exit; Exit;
if not (csDesigning in ComponentState) then // issue #41109
begin
InitiateActions; // actions may update items visibility InitiateActions; // actions may update items visibility
if InternalRethinkLines(False) then if InternalRethinkLines(False) then
begin begin
@ -441,6 +442,7 @@ begin
for i := 0 to Count - 1 do for i := 0 to Count - 1 do
Items[I].DestroyHandle; Items[I].DestroyHandle;
end; end;
end;
AMenu := GetMenu(Self); AMenu := GetMenu(Self);
AMergedItems := MergedItems; AMergedItems := MergedItems;