mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-20 10:45:55 +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
|
var
|
||||||
OldEditorMode: boolean;
|
OldEditorMode: boolean;
|
||||||
|
OldRow: Integer;
|
||||||
begin
|
begin
|
||||||
{$ifdef dbgDBGrid}
|
{$ifdef dbgDBGrid}
|
||||||
DebugLn('%s.OnDataSetScrolled Distance=%d ds.RecordCount=%d',[ClassName, Distance, aDataSet.RecordCount]);
|
DebugLn('%s.OnDataSetScrolled Distance=%d ds.RecordCount=%d',[ClassName, Distance, aDataSet.RecordCount]);
|
||||||
@ -950,7 +951,12 @@ begin
|
|||||||
EditorMode := False;
|
EditorMode := False;
|
||||||
|
|
||||||
if Distance<>0 then begin
|
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;
|
Invalidate;
|
||||||
end else
|
end else
|
||||||
UpdateActive;
|
UpdateActive;
|
||||||
|
Loading…
Reference in New Issue
Block a user