mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 05:59:28 +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;
|
||||
ForceReset: boolean;
|
||||
begin
|
||||
|
||||
Result:=TryMoveSelection(Relative,DCol,DRow);
|
||||
if (not Result) then Exit;
|
||||
|
||||
@ -6492,8 +6491,8 @@ begin
|
||||
if not ScrollToCell(DCol, DRow, ForceReset) then
|
||||
InvalidateMovement(DCol, DRow, OldRange);
|
||||
|
||||
SwapInt(DCol,FCol);
|
||||
SwapInt(DRow,FRow);
|
||||
FCol := DCol;
|
||||
FRow := DRow;
|
||||
|
||||
MoveSelection;
|
||||
SelectEditor;
|
||||
@ -6581,17 +6580,18 @@ begin
|
||||
if FixedGrid then
|
||||
exit;
|
||||
|
||||
dCol:=FCol*(1-Byte(not Relative))+DCol;
|
||||
dRow:=FRow*(1-Byte(not Relative))+DRow;
|
||||
if Relative then begin
|
||||
Inc(DCol, FCol);
|
||||
Inc(DRow, FRow);
|
||||
end;
|
||||
|
||||
CheckLimits(DCol, DRow);
|
||||
|
||||
// Change on Focused cell?
|
||||
if (Dcol=FCol) and (DRow=FRow) then begin
|
||||
SelectCell(DCol,DRow);
|
||||
end else begin
|
||||
if (DCol=FCol) and (DRow=FRow) then
|
||||
SelectCell(DCol,DRow)
|
||||
else
|
||||
Result:=SelectCell(DCol,DRow);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.UnLockEditor;
|
||||
|
Loading…
Reference in New Issue
Block a user