mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 01:19:16 +02:00
LCL: Simplify TCustomGrid code a little.
git-svn-id: trunk@30536 -
This commit is contained in:
parent
82fa636bdc
commit
112fd87d96
@ -6462,7 +6462,6 @@ var
|
|||||||
OldRange: TRect;
|
OldRange: TRect;
|
||||||
ForceReset: boolean;
|
ForceReset: boolean;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
Result:=TryMoveSelection(Relative,DCol,DRow);
|
Result:=TryMoveSelection(Relative,DCol,DRow);
|
||||||
if (not Result) then Exit;
|
if (not Result) then Exit;
|
||||||
|
|
||||||
@ -6492,8 +6491,8 @@ begin
|
|||||||
if not ScrollToCell(DCol, DRow, ForceReset) then
|
if not ScrollToCell(DCol, DRow, ForceReset) then
|
||||||
InvalidateMovement(DCol, DRow, OldRange);
|
InvalidateMovement(DCol, DRow, OldRange);
|
||||||
|
|
||||||
SwapInt(DCol,FCol);
|
FCol := DCol;
|
||||||
SwapInt(DRow,FRow);
|
FRow := DRow;
|
||||||
|
|
||||||
MoveSelection;
|
MoveSelection;
|
||||||
SelectEditor;
|
SelectEditor;
|
||||||
@ -6581,17 +6580,18 @@ begin
|
|||||||
if FixedGrid then
|
if FixedGrid then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
dCol:=FCol*(1-Byte(not Relative))+DCol;
|
if Relative then begin
|
||||||
dRow:=FRow*(1-Byte(not Relative))+DRow;
|
Inc(DCol, FCol);
|
||||||
|
Inc(DRow, FRow);
|
||||||
|
end;
|
||||||
|
|
||||||
CheckLimits(DCol, DRow);
|
CheckLimits(DCol, DRow);
|
||||||
|
|
||||||
// Change on Focused cell?
|
// Change on Focused cell?
|
||||||
if (Dcol=FCol) and (DRow=FRow) then begin
|
if (DCol=FCol) and (DRow=FRow) then
|
||||||
SelectCell(DCol,DRow);
|
SelectCell(DCol,DRow)
|
||||||
end else begin
|
else
|
||||||
Result:=SelectCell(DCol,DRow);
|
Result:=SelectCell(DCol,DRow);
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomGrid.UnLockEditor;
|
procedure TCustomGrid.UnLockEditor;
|
||||||
|
Loading…
Reference in New Issue
Block a user