mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 03:40:31 +02:00
LCL: TListView: store column widths on handle destruction. Issue #32922
git-svn-id: trunk@56910 -
This commit is contained in:
parent
44d4157a28
commit
be6ec02cd2
@ -1234,6 +1234,7 @@ type
|
||||
function GetItem(const AIndex: Integer): TListColumn;
|
||||
procedure WSCreateColumns;
|
||||
procedure SetItem(const AIndex: Integer; const AValue: TListColumn);
|
||||
procedure DoFinalizeWnd;
|
||||
protected
|
||||
function GetOwner: TPersistent; override;
|
||||
public
|
||||
|
@ -1154,6 +1154,7 @@ begin
|
||||
FViewOriginCache := TWSCustomListViewClass(WidgetSetClass).GetViewOrigin(Self);
|
||||
if not OwnerData then
|
||||
FListItems.DoFinalizeWnd;
|
||||
Columns.DoFinalizeWnd;
|
||||
inherited FinalizeWnd;
|
||||
end;
|
||||
|
||||
|
@ -62,6 +62,14 @@ begin
|
||||
EndUpdate;
|
||||
end;
|
||||
|
||||
procedure TListColumns.DoFinalizeWnd;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
for I := 0 to Count-1 do
|
||||
Items[I].GetWidth; // store real width from WS into FWidth
|
||||
end;
|
||||
|
||||
procedure TListColumns.Update(Item: TCollectionItem);
|
||||
begin
|
||||
if (Item = nil) and FNeedsUpdate then
|
||||
|
Loading…
Reference in New Issue
Block a user