mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 00:52:34 +02:00
win32: TCustomListBox: don't recreateWnd if we are destroying handle
git-svn-id: trunk@16410 -
This commit is contained in:
parent
3083aece74
commit
5f76c9b083
@ -139,7 +139,7 @@ begin
|
||||
GetItemIndex;
|
||||
//DebugLn('[TCustomListBox.FinalizeWnd] A ',FItems.ClassName);
|
||||
// create internal item list
|
||||
if Assigned(FItems) then begin;
|
||||
if Assigned(FItems) then begin
|
||||
NewStrings:= TExtendedStringList.Create(GetCachedDataSize);
|
||||
|
||||
// copy items (text+objects) from the interface items list
|
||||
|
@ -93,11 +93,12 @@ End;
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TWin32ListStringList.Sort;
|
||||
Begin
|
||||
begin
|
||||
// The win api doesn't allow to change the sort on the fly,
|
||||
// so is needed to recreate the window
|
||||
RecreateWnd(FSender);
|
||||
End;
|
||||
if not (csDestroyingHandle in FSender.ControlState) then
|
||||
RecreateWnd(FSender);
|
||||
end;
|
||||
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user