mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-26 15:14:06 +02:00
LCL, fix resizing column issue #12098 (topleft calc failed because new columns have accumwidth=0)
git-svn-id: trunk@16505 -
This commit is contained in:
parent
f2b1c88495
commit
bef0e71b34
@ -2198,6 +2198,13 @@ begin
|
||||
if IsColumn then begin
|
||||
AddDel(FCols, NewValue);
|
||||
FGCache.AccumWidth.Count:=NewValue;
|
||||
// calc initial accumulated widths of new columns
|
||||
OldCount := OldValue;
|
||||
while (OldValue>0) and (OldCount<NewValue) do begin
|
||||
FGCache.AccumWidth[OldCount] :=
|
||||
FGCache.AccumWidth[OldCount-1] + GetColWidths(OldCount);
|
||||
Inc(OldCount);
|
||||
end;
|
||||
OldCount:=RowCount;
|
||||
if (OldValue=0)and(NewValue>=0) then begin
|
||||
FTopLeft.X:=FFixedCols;
|
||||
@ -2217,6 +2224,13 @@ begin
|
||||
end else begin
|
||||
AddDel(FRows, NewValue);
|
||||
FGCache.AccumHeight.Count:=NewValue;
|
||||
// calc initial accumulated heights of new rows
|
||||
OldCount := OldValue;
|
||||
while (OldValue>0) and (OldCount<NewValue) do begin
|
||||
FGCache.AccumHeight[OldCount] :=
|
||||
FGCache.AccumHeight[OldCount-1] + GetRowHeights(OldCount);
|
||||
Inc(OldCount);
|
||||
end;
|
||||
OldCount:=ColCount;
|
||||
if (OldValue=0)and(NewValue>=0) then begin
|
||||
FTopleft.Y:=FFixedRows;
|
||||
|
Loading…
Reference in New Issue
Block a user