mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 20:59:12 +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;
|
NewParent := GetSelectedDesignComponent;
|
||||||
|
|
||||||
// get parent component of neighboring component
|
// get parent component of neighboring component
|
||||||
if AAddNeighboring then
|
if AAddNeighboring and assigned(NewParent) then
|
||||||
if NewParent.HasParent then
|
begin
|
||||||
NewParent := NewParent.GetParentComponent;
|
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
|
if NewParent = nil then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user