mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-05 14:18:18 +02:00
avoid drawing data if dataset is empty
git-svn-id: trunk@9702 -
This commit is contained in:
parent
2fcdb04917
commit
b4de789eaa
@ -283,6 +283,7 @@ type
|
||||
FTempText : string;
|
||||
FDrawingActiveRecord: Boolean;
|
||||
FDrawingMultiSelRecord: Boolean;
|
||||
FDrawingEmptyDataset: Boolean;
|
||||
FEditingColumn: Integer;
|
||||
FOldPosition: Integer;
|
||||
FDefaultColWidths: boolean;
|
||||
@ -1674,7 +1675,8 @@ begin
|
||||
else
|
||||
if (aRow=0)and(ACol>=FixedCols) then
|
||||
DrawCellText(aCol,aRow,aRect,aState,GetColumnTitle(aCol));
|
||||
end else begin
|
||||
end else
|
||||
if not FDrawingEmptyDataset then begin
|
||||
F := GetFieldFromGridColumn(aCol);
|
||||
case ColumnEditorStyle(aCol, F) of
|
||||
cbsCheckBoxColumn:
|
||||
@ -2306,7 +2308,9 @@ var
|
||||
begin
|
||||
if FDataLink.Active then begin
|
||||
CurActiveRecord:=FDataLink.ActiveRecord;
|
||||
end;
|
||||
FDrawingEmptyDataset:=FDatalink.DataSet.IsEmpty;
|
||||
end else
|
||||
FDrawingEmptyDataset:=True;
|
||||
try
|
||||
inherited DrawAllRows;
|
||||
finally
|
||||
|
Loading…
Reference in New Issue
Block a user