mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-25 18:02:40 +02:00
LCL: DBGrid: Fixed pressing RETURN in the last row of the DBGrid the focus stay in the last column. Issue #33294
git-svn-id: trunk@57458 -
This commit is contained in:
parent
196ca5e7fd
commit
40285d1653
@ -2381,6 +2381,8 @@ var
|
||||
end;
|
||||
|
||||
procedure MoveSel(AReset: boolean);
|
||||
var
|
||||
ACol: Integer;
|
||||
begin
|
||||
if (DeltaCol<>0) or (DeltaRow<>0) then begin
|
||||
if DeltaRow > 0 then begin
|
||||
@ -2398,7 +2400,16 @@ var
|
||||
else if Col + DeltaCol >= ColCount then
|
||||
Col := ColCount - 1
|
||||
else
|
||||
Col := Col + DeltaCol;
|
||||
begin
|
||||
ACol := Col + DeltaCol;
|
||||
if ColWidths[ACol] > 0 then
|
||||
Col := ACol
|
||||
else
|
||||
if DeltaCol < 0 then
|
||||
Col := GetFirstVisibleColumn
|
||||
else
|
||||
Col := GetLastVisibleColumn;
|
||||
end;
|
||||
GridFlags := GridFlags - [gfEditingDone];
|
||||
end else
|
||||
if AReset then
|
||||
|
Loading…
Reference in New Issue
Block a user