mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 13:59:23 +02:00
LCL: fixed ButtonPanel last visible button detection logic, bug #19210
git-svn-id: trunk@31383 -
This commit is contained in:
parent
481b0956e0
commit
3526858f4e
@ -338,7 +338,7 @@ begin
|
|||||||
if not (AControl is TPanelBitBtn) then exit(false);
|
if not (AControl is TPanelBitBtn) then exit(false);
|
||||||
for i:=low(FButtons) to pred(high(FButtons)) do
|
for i:=low(FButtons) to pred(high(FButtons)) do
|
||||||
if (FButtons[i]<>nil) and FButtons[i].IsControlVisible
|
if (FButtons[i]<>nil) and FButtons[i].IsControlVisible
|
||||||
and (FButtons[i].Tag>AControl.Tag) then
|
and (FButtons[i].TabOrder>TPanelBitBtn(AControl).TabOrder) then
|
||||||
exit(false); // there is a higher one
|
exit(false); // there is a higher one
|
||||||
Result:=true;
|
Result:=true;
|
||||||
end;
|
end;
|
||||||
@ -554,7 +554,7 @@ begin
|
|||||||
Exit(True)
|
Exit(True)
|
||||||
else if (AControl1 is TPanelBitBtn) and (not (AControl2 is TPanelBitBtn)) then
|
else if (AControl1 is TPanelBitBtn) and (not (AControl2 is TPanelBitBtn)) then
|
||||||
Exit(False);
|
Exit(False);
|
||||||
// sort for tag
|
// sort for taborder
|
||||||
Result := TWinControl(AControl2).TabOrder > TWinControl(AControl1).TabOrder;
|
Result := TWinControl(AControl2).TabOrder > TWinControl(AControl1).TabOrder;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user