mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-09 11:18:13 +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 InvalidateRange(const aRange: TRect);
|
||||||
procedure InvalidateRow(ARow: Integer);
|
procedure InvalidateRow(ARow: Integer);
|
||||||
function IscellVisible(aCol, aRow: Integer): Boolean;
|
function IscellVisible(aCol, aRow: Integer): Boolean;
|
||||||
|
function IsFixedCellVisible(aCol, aRow: Integer): boolean;
|
||||||
procedure LoadFromFile(FileName: string);
|
procedure LoadFromFile(FileName: string);
|
||||||
function MouseCoord(X,Y: Integer): TGridCoord;
|
function MouseCoord(X,Y: Integer): TGridCoord;
|
||||||
function MouseToCell(const Mouse: TPoint): TPoint; overload;
|
function MouseToCell(const Mouse: TPoint): TPoint; overload;
|
||||||
@ -6379,6 +6380,13 @@ begin
|
|||||||
Result:= (Left<=ACol)and(aCol<=Right)and(Top<=aRow)and(aRow<=Bottom);
|
Result:= (Left<=ACol)and(aCol<=Right)and(Top<=aRow)and(aRow<=Bottom);
|
||||||
end;
|
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);
|
procedure TCustomGrid.InvalidateCol(ACol: Integer);
|
||||||
var
|
var
|
||||||
R: TRect;
|
R: TRect;
|
||||||
@ -6799,7 +6807,7 @@ begin
|
|||||||
DebugLn(['InvalidateCell Col=',aCol,
|
DebugLn(['InvalidateCell Col=',aCol,
|
||||||
' Row=',aRow,' Redraw=', Redraw]);
|
' Row=',aRow,' Redraw=', Redraw]);
|
||||||
{$Endif}
|
{$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);
|
R:=CellRect(aCol, aRow);
|
||||||
InvalidateRect(Handle, @R, Redraw);
|
InvalidateRect(Handle, @R, Redraw);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user