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:
jesus 2008-12-01 23:34:14 +00:00
parent d2a489e5c4
commit 4d0dfb40f0

View File

@ -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;