From 3526858f4e49d13d1a981aa674304ece1aa3a019 Mon Sep 17 00:00:00 2001 From: maxim Date: Sat, 25 Jun 2011 13:08:19 +0000 Subject: [PATCH] LCL: fixed ButtonPanel last visible button detection logic, bug #19210 git-svn-id: trunk@31383 - --- lcl/buttonpanel.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lcl/buttonpanel.pas b/lcl/buttonpanel.pas index a872bc0467..1fccf4f9ee 100644 --- a/lcl/buttonpanel.pas +++ b/lcl/buttonpanel.pas @@ -338,7 +338,7 @@ begin if not (AControl is TPanelBitBtn) then exit(false); for i:=low(FButtons) to pred(high(FButtons)) do 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 Result:=true; end; @@ -554,7 +554,7 @@ begin Exit(True) else if (AControl1 is TPanelBitBtn) and (not (AControl2 is TPanelBitBtn)) then Exit(False); - // sort for tag + // sort for taborder Result := TWinControl(AControl2).TabOrder > TWinControl(AControl1).TabOrder; end;