mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-30 11:02:56 +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;
|
end;
|
||||||
|
|
||||||
procedure MoveSel(AReset: boolean);
|
procedure MoveSel(AReset: boolean);
|
||||||
|
var
|
||||||
|
ACol: Integer;
|
||||||
begin
|
begin
|
||||||
if (DeltaCol<>0) or (DeltaRow<>0) then begin
|
if (DeltaCol<>0) or (DeltaRow<>0) then begin
|
||||||
if DeltaRow > 0 then begin
|
if DeltaRow > 0 then begin
|
||||||
@ -2398,7 +2400,16 @@ var
|
|||||||
else if Col + DeltaCol >= ColCount then
|
else if Col + DeltaCol >= ColCount then
|
||||||
Col := ColCount - 1
|
Col := ColCount - 1
|
||||||
else
|
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];
|
GridFlags := GridFlags - [gfEditingDone];
|
||||||
end else
|
end else
|
||||||
if AReset then
|
if AReset then
|
||||||
|
Loading…
Reference in New Issue
Block a user