mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 16:19:13 +02:00
* Search element from back to front to respect Z-order (bug id #33291)
git-svn-id: trunk@57683 -
This commit is contained in:
parent
445127a35d
commit
b31e9e78e1
@ -913,8 +913,9 @@ begin
|
|||||||
Result:=B;
|
Result:=B;
|
||||||
RB:=B.AsBand;
|
RB:=B.AsBand;
|
||||||
O:=Nil;
|
O:=Nil;
|
||||||
I:=0;
|
// We must search backwards
|
||||||
While (O=Nil) and (I<COunt) do
|
I:=Count-1;
|
||||||
|
While (O=Nil) and (I>=0) do
|
||||||
begin
|
begin
|
||||||
O:=Objects[i];
|
O:=Objects[i];
|
||||||
{$IFDEF DEBUGROL}
|
{$IFDEF DEBUGROL}
|
||||||
@ -930,7 +931,7 @@ begin
|
|||||||
if not PtInRect(R,P) then
|
if not PtInRect(R,P) then
|
||||||
O:=Nil;
|
O:=Nil;
|
||||||
end;
|
end;
|
||||||
Inc(I);
|
Dec(I);
|
||||||
end;
|
end;
|
||||||
if O<>Nil then
|
if O<>Nil then
|
||||||
Result:=O;
|
Result:=O;
|
||||||
|
Loading…
Reference in New Issue
Block a user