mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 05:50:21 +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;
|
||||
|
||||
// adjust editor bounds
|
||||
if IsColumn and (Index<=NewCol) then
|
||||
Inc(NewCol)
|
||||
else
|
||||
if (not IsColumn) and (Index<=NewRow) then
|
||||
Inc(NewRow);
|
||||
if IsColumn then begin
|
||||
if NewCol<FixedCols then
|
||||
NewCol := FixedCols
|
||||
else
|
||||
if Index<=NewCol then
|
||||
Inc(NewCol);
|
||||
end else begin
|
||||
if NewRow<FixedRows then
|
||||
NewRow := FixedRows
|
||||
else
|
||||
if Index<=NewRow then
|
||||
Inc(NewRow);
|
||||
end;
|
||||
AdjustEditorBounds(NewCol, NewRow)
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user