mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 06:49:12 +02:00
IDE: Fix a range error when two ActionListEditors have an action with same name. Patch from Anton, issue #19218
git-svn-id: trunk@30456 -
This commit is contained in:
parent
0dcb68fda8
commit
12f497705c
@ -377,10 +377,10 @@ end;
|
|||||||
|
|
||||||
procedure TActionListEditor.OnComponentRenamed(AComponent: TComponent);
|
procedure TActionListEditor.OnComponentRenamed(AComponent: TComponent);
|
||||||
begin
|
begin
|
||||||
if (not Visible) or (FActionList=nil)
|
if Visible and Assigned(FActionList)
|
||||||
or (not Assigned(FActionList.ActionByName(AComponent.Name)))
|
and (AComponent is TAction) and (TAction(AComponent).ActionList = FActionList)
|
||||||
then Exit;
|
and Assigned(FActionList.ActionByName(AComponent.Name)) then
|
||||||
lstActionName.Items[lstActionName.ItemIndex] := AComponent.Name;
|
lstActionName.Items[lstActionName.ItemIndex] := AComponent.Name;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TActionListEditor.OnComponentSelection(
|
procedure TActionListEditor.OnComponentSelection(
|
||||||
|
Loading…
Reference in New Issue
Block a user