Commit e80dcc0d authored by Jesus's avatar Jesus
Browse files

LCL, dbgrid, call SelectEditor manually in DatasetScrolled in case row index...

LCL, dbgrid, call SelectEditor manually in DatasetScrolled in case row index do not change, based on patch by Luca Olivetti, issue #27232

git-svn-id: trunk@47911 -
parent 72326324
......@@ -936,6 +936,7 @@ procedure TCustomDBGrid.OnDataSetScrolled(aDataSet: TDataSet; Distance: Integer
);
var
OldEditorMode: boolean;
OldRow: Integer;
begin
{$ifdef dbgDBGrid}
DebugLn('%s.OnDataSetScrolled Distance=%d ds.RecordCount=%d',[ClassName, Distance, aDataSet.RecordCount]);
......@@ -950,7 +951,12 @@ begin
EditorMode := False;
if Distance<>0 then begin
Row:= FixedRows + FDataLink.ActiveRecord;
OldRow := Row;
Row := FixedRows + FDataLink.ActiveRecord;
if OldRow=Row then // if OldRow<>NewRow SelectEditor will be called by MoveExtend
SelectEditor; // if OldRow=NewRow we need to manually call SelectEditor
Invalidate;
end else
UpdateActive;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment