mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 13:09:36 +02:00
Object Inspector: Prevent adding the same parent candidates repeatedly for "Change Parent" menu.
git-svn-id: trunk@49427 -
This commit is contained in:
parent
795eed89a4
commit
75347d7f7c
@ -5278,17 +5278,16 @@ var
|
||||
Candidates: TFPList;
|
||||
i: Integer;
|
||||
begin
|
||||
Result := False;
|
||||
Candidates := GetChangeParentCandidates;
|
||||
try
|
||||
if Candidates.Count = 0 then Exit;
|
||||
Result := Candidates.Count>0;
|
||||
ChangeParentPopupmenuItem.Clear;
|
||||
for i := 0 to Candidates.Count-1 do
|
||||
begin
|
||||
Item := NewItem(TWinControl(Candidates[i]).Name, 0, False, True,
|
||||
@DoChangeParentItemClick, 0, '');
|
||||
ChangeParentPopupmenuItem.Add(Item);
|
||||
end;
|
||||
Result := True;
|
||||
finally
|
||||
Candidates.Free;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user