mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 00:19:32 +02:00
LCL, fix dbgrid index out of bounds (-1) when the selected record is not the first and the dataset is closed and opened
git-svn-id: trunk@28484 -
This commit is contained in:
parent
0f237c154c
commit
e677aae348
@ -719,10 +719,8 @@ begin
|
||||
OldFixedCols := FixedCols;
|
||||
OldFixedRows := FixedRows;
|
||||
Clear;
|
||||
ColCount := OldFixedCols + 1;
|
||||
RowCount := OldFixedRows + 1;
|
||||
FixedCols := OldFixedCols;
|
||||
FixedRows := OldFixedRows;
|
||||
ColCount := OldFixedCols + 1;
|
||||
if dgIndicator in Options then
|
||||
ColWidths[0]:=12;
|
||||
end;
|
||||
|
@ -2667,6 +2667,8 @@ begin
|
||||
NewColCount := FGridPropBackup.ColCount;
|
||||
FFixedCols := Min(FGridPropBackup.FixedColCount, NewColCount);
|
||||
FFixedRows := Min(FGridPropBackup.FixedRowCount, AValue);
|
||||
FTopLeft.X := FFixedCols;
|
||||
FTopLeft.Y := FFixedRows;
|
||||
// ignore backedup value of rowcount because
|
||||
// finally rowcount will be AValue
|
||||
FGridPropBackup.RowCount := AValue;
|
||||
|
Loading…
Reference in New Issue
Block a user