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