mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 01:19:37 +02:00
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 -
This commit is contained in:
parent
72326324bd
commit
e80dcc0d2d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user