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:
juha 2011-04-24 20:21:37 +00:00
parent 0dcb68fda8
commit 12f497705c

View File

@ -377,10 +377,10 @@ end;
procedure TActionListEditor.OnComponentRenamed(AComponent: TComponent);
begin
if (not Visible) or (FActionList=nil)
or (not Assigned(FActionList.ActionByName(AComponent.Name)))
then Exit;
lstActionName.Items[lstActionName.ItemIndex] := AComponent.Name;
if Visible and Assigned(FActionList)
and (AComponent is TAction) and (TAction(AComponent).ActionList = FActionList)
and Assigned(FActionList.ActionByName(AComponent.Name)) then
lstActionName.Items[lstActionName.ItemIndex] := AComponent.Name;
end;
procedure TActionListEditor.OnComponentSelection(