mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-03 07:38:30 +02:00
LCL, fix dbgrid indicator appearing multiple times, problem introduced in r29577 #cb47ca2b93
git-svn-id: trunk@29655 -
This commit is contained in:
parent
eec60401f7
commit
1eaf436446
@ -1094,6 +1094,7 @@ type
|
||||
procedure InvalidateRange(const aRange: TRect);
|
||||
procedure InvalidateRow(ARow: Integer);
|
||||
function IscellVisible(aCol, aRow: Integer): Boolean;
|
||||
function IsFixedCellVisible(aCol, aRow: Integer): boolean;
|
||||
procedure LoadFromFile(FileName: string);
|
||||
function MouseCoord(X,Y: Integer): TGridCoord;
|
||||
function MouseToCell(const Mouse: TPoint): TPoint; overload;
|
||||
@ -6379,6 +6380,13 @@ begin
|
||||
Result:= (Left<=ACol)and(aCol<=Right)and(Top<=aRow)and(aRow<=Bottom);
|
||||
end;
|
||||
|
||||
function TCustomGrid.IsFixedCellVisible(aCol, aRow: Integer): boolean;
|
||||
begin
|
||||
with FGCache.VisibleGrid do
|
||||
result := ((aCol<FixedCols) and ((aRow<FixedRows) or ((aRow>=Top)and(aRow<=Bottom)))) or
|
||||
((aRow<FixedRows) and ((aCol<FixedCols) or ((aCol>=Left)and(aCol<=Right))));
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.InvalidateCol(ACol: Integer);
|
||||
var
|
||||
R: TRect;
|
||||
@ -6799,7 +6807,7 @@ begin
|
||||
DebugLn(['InvalidateCell Col=',aCol,
|
||||
' Row=',aRow,' Redraw=', Redraw]);
|
||||
{$Endif}
|
||||
if HandleAllocated and IsCellVisible(aCol,aRow) then begin
|
||||
if HandleAllocated and (IsCellVisible(aCol, aRow) or IsFixedCellVisible(aCol, aRow)) then begin
|
||||
R:=CellRect(aCol, aRow);
|
||||
InvalidateRect(Handle, @R, Redraw);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user