mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 21:59:14 +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;
|
FTempText : string;
|
||||||
FDrawingActiveRecord: Boolean;
|
FDrawingActiveRecord: Boolean;
|
||||||
FDrawingMultiSelRecord: Boolean;
|
FDrawingMultiSelRecord: Boolean;
|
||||||
|
FDrawingEmptyDataset: Boolean;
|
||||||
FEditingColumn: Integer;
|
FEditingColumn: Integer;
|
||||||
FOldPosition: Integer;
|
FOldPosition: Integer;
|
||||||
FDefaultColWidths: boolean;
|
FDefaultColWidths: boolean;
|
||||||
@ -1674,7 +1675,8 @@ begin
|
|||||||
else
|
else
|
||||||
if (aRow=0)and(ACol>=FixedCols) then
|
if (aRow=0)and(ACol>=FixedCols) then
|
||||||
DrawCellText(aCol,aRow,aRect,aState,GetColumnTitle(aCol));
|
DrawCellText(aCol,aRow,aRect,aState,GetColumnTitle(aCol));
|
||||||
end else begin
|
end else
|
||||||
|
if not FDrawingEmptyDataset then begin
|
||||||
F := GetFieldFromGridColumn(aCol);
|
F := GetFieldFromGridColumn(aCol);
|
||||||
case ColumnEditorStyle(aCol, F) of
|
case ColumnEditorStyle(aCol, F) of
|
||||||
cbsCheckBoxColumn:
|
cbsCheckBoxColumn:
|
||||||
@ -2306,7 +2308,9 @@ var
|
|||||||
begin
|
begin
|
||||||
if FDataLink.Active then begin
|
if FDataLink.Active then begin
|
||||||
CurActiveRecord:=FDataLink.ActiveRecord;
|
CurActiveRecord:=FDataLink.ActiveRecord;
|
||||||
end;
|
FDrawingEmptyDataset:=FDatalink.DataSet.IsEmpty;
|
||||||
|
end else
|
||||||
|
FDrawingEmptyDataset:=True;
|
||||||
try
|
try
|
||||||
inherited DrawAllRows;
|
inherited DrawAllRows;
|
||||||
finally
|
finally
|
||||||
|
Loading…
Reference in New Issue
Block a user