|
@@ -409,12 +409,25 @@ end;
|
|
|
|
|
|
function TFresnelFormMediator.ComponentAtPos(p: TPoint;
|
|
|
MinClass: TComponentClass; Flags: TDMCompAtPosFlags): TComponent;
|
|
|
+var
|
|
|
+ ElArr: TFresnelElementArray;
|
|
|
+ El: TFresnelElement;
|
|
|
+ i: Integer;
|
|
|
begin
|
|
|
if Flags=[] then ;
|
|
|
- Result:=DsgnForm.GetElementAt(p.X,p.Y);
|
|
|
- if Result=nil then exit;
|
|
|
- if (MinClass<>nil) and not Result.InheritsFrom(MinClass) then
|
|
|
- Result:=nil;
|
|
|
+ // skip sub elements aka return only elements owned by the lookup root,
|
|
|
+ // which are streamed
|
|
|
+ ElArr:=DsgnForm.GetElementsAt(p.X,p.Y);
|
|
|
+ for i:=0 to length(ElArr)-1 do
|
|
|
+ begin
|
|
|
+ El:=ElArr[i];
|
|
|
+ if (El=DsgnForm) or (El.Owner=DsgnForm) then
|
|
|
+ begin
|
|
|
+ if (MinClass=nil) or El.InheritsFrom(MinClass) then
|
|
|
+ exit(El);
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+ Result:=nil;
|
|
|
end;
|
|
|
|
|
|
function TFresnelFormMediator.ParentAcceptsChild(Parent: TComponent;
|