LCL, only adjust editor position if colcount/rowcount change will affect editor, issue #23652

git-svn-id: trunk@39868 -
This commit is contained in:
jesus 2013-01-17 02:09:04 +00:00
parent 32ed7b46e7
commit 459cdc0ca9

View File

@ -2684,7 +2684,12 @@ begin
end;
end;
SizeChanged(OldValue, OldCount);
FixPosition(True, Col);
// if new count makes current col out of range, adjust position
// if not, position should not change (fake changed col to be the last one)
Dec(NewValue);
if NewValue<Col then
NewValue:=Col;
FixPosition(True, NewValue);
end else begin
AddDel(FRows, NewValue);
FGCache.AccumHeight.Count:=NewValue;
@ -2714,7 +2719,12 @@ begin
end;
end;
SizeChanged(OldCount, OldValue);
FixPosition(False, Row);
// if new count makes current row out of range, adjust position
// if not, position should not change (fake changed row to be the last one)
Dec(NewValue);
if NewValue<Row then
NewValue:=Row;
FixPosition(False, NewValue);
end;
end;