mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 03:58:09 +02:00
IDE: Fix ComponentList adding comp with [Ctrl+Enter] on an empty form. Issue #40245, patch by n7800.
This commit is contained in:
parent
2d059ffef4
commit
e36a1b4633
@ -281,9 +281,15 @@ begin
|
||||
NewParent := GetSelectedDesignComponent;
|
||||
|
||||
// get parent component of neighboring component
|
||||
if AAddNeighboring then
|
||||
if NewParent.HasParent then
|
||||
NewParent := NewParent.GetParentComponent;
|
||||
if AAddNeighboring and assigned(NewParent) then
|
||||
begin
|
||||
if (not (NewParent is TCustomForm)) and
|
||||
(not (NewParent is TCustomFrame)) then
|
||||
begin
|
||||
if NewParent.HasParent then
|
||||
NewParent := NewParent.GetParentComponent;
|
||||
end;
|
||||
end;
|
||||
if NewParent = nil then
|
||||
Exit;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user