mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 21:40:25 +02:00
LCL, fix grid exeption after removing all rows and adding a new row, issue #12666
git-svn-id: trunk@17655 -
This commit is contained in:
parent
d2a489e5c4
commit
4d0dfb40f0
@ -4695,11 +4695,19 @@ begin
|
|||||||
VisualChange;
|
VisualChange;
|
||||||
|
|
||||||
// adjust editor bounds
|
// adjust editor bounds
|
||||||
if IsColumn and (Index<=NewCol) then
|
if IsColumn then begin
|
||||||
Inc(NewCol)
|
if NewCol<FixedCols then
|
||||||
|
NewCol := FixedCols
|
||||||
else
|
else
|
||||||
if (not IsColumn) and (Index<=NewRow) then
|
if Index<=NewCol then
|
||||||
|
Inc(NewCol);
|
||||||
|
end else begin
|
||||||
|
if NewRow<FixedRows then
|
||||||
|
NewRow := FixedRows
|
||||||
|
else
|
||||||
|
if Index<=NewRow then
|
||||||
Inc(NewRow);
|
Inc(NewRow);
|
||||||
|
end;
|
||||||
AdjustEditorBounds(NewCol, NewRow)
|
AdjustEditorBounds(NewCol, NewRow)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user