mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-21 00:26:43 +02:00
LCL, fix selection after changing fixed cols/rows, issue #20607
git-svn-id: trunk@33313 -
This commit is contained in:
parent
d19fefdef5
commit
12c475e8ed
@ -2337,8 +2337,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomGrid.SetFixedCols(const AValue: Integer);
|
procedure TCustomGrid.SetFixedCols(const AValue: Integer);
|
||||||
var
|
|
||||||
EditorAffected: boolean;
|
|
||||||
begin
|
begin
|
||||||
if FFixedCols=AValue then begin
|
if FFixedCols=AValue then begin
|
||||||
if FixedGrid and FGridPropBackup.ValidData then begin
|
if FixedGrid and FGridPropBackup.ValidData then begin
|
||||||
@ -2350,8 +2348,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
CheckFixedCount(ColCount, RowCount, AValue, FFixedRows);
|
CheckFixedCount(ColCount, RowCount, AValue, FFixedRows);
|
||||||
|
|
||||||
EditorAffected := (AValue>=FCol);
|
if EditorMode then
|
||||||
if EditorAffected and EditorMode then
|
|
||||||
EditorMode:=False;
|
EditorMode:=False;
|
||||||
|
|
||||||
FFixedCols:=AValue;
|
FFixedCols:=AValue;
|
||||||
@ -2371,16 +2368,12 @@ begin
|
|||||||
if not (csLoading in componentState) then
|
if not (csLoading in componentState) then
|
||||||
doTopleftChange(true);
|
doTopleftChange(true);
|
||||||
|
|
||||||
if EditorAffected then begin
|
MoveNextSelectable(False, FixedCols, FRow);
|
||||||
MoveNextSelectable(False, FixedCols, FRow);
|
UpdateSelectionRange;
|
||||||
UpdateSelectionRange;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomGrid.SetFixedRows(const AValue: Integer);
|
procedure TCustomGrid.SetFixedRows(const AValue: Integer);
|
||||||
var
|
|
||||||
EditorAffected: boolean;
|
|
||||||
begin
|
begin
|
||||||
if FFixedRows=AValue then begin
|
if FFixedRows=AValue then begin
|
||||||
if FixedGrid and FGridPropBackup.ValidData then begin
|
if FixedGrid and FGridPropBackup.ValidData then begin
|
||||||
@ -2392,8 +2385,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
CheckFixedCount(ColCount, RowCount, FFixedCols, AValue);
|
CheckFixedCount(ColCount, RowCount, FFixedCols, AValue);
|
||||||
|
|
||||||
EditorAffected := (AValue>=FRow);
|
if EditorMode then
|
||||||
if EditorAffected and EditorMode then
|
|
||||||
EditorMode:=False;
|
EditorMode:=False;
|
||||||
|
|
||||||
FFixedRows:=AValue;
|
FFixedRows:=AValue;
|
||||||
@ -2402,10 +2394,8 @@ begin
|
|||||||
if not (csLoading in ComponentState) then
|
if not (csLoading in ComponentState) then
|
||||||
doTopleftChange(true);
|
doTopleftChange(true);
|
||||||
|
|
||||||
if EditorAffected then begin
|
MoveNextSelectable(False, FCol, FixedRows);
|
||||||
MoveNextSelectable(False, FCol, FixedRows);
|
UpdateSelectionRange;
|
||||||
UpdateSelectionRange;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomGrid.SetGridLineColor(const AValue: TColor);
|
procedure TCustomGrid.SetGridLineColor(const AValue: TColor);
|
||||||
|
Loading…
Reference in New Issue
Block a user