mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 02:38:13 +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;
|
GetItemIndex;
|
||||||
//DebugLn('[TCustomListBox.FinalizeWnd] A ',FItems.ClassName);
|
//DebugLn('[TCustomListBox.FinalizeWnd] A ',FItems.ClassName);
|
||||||
// create internal item list
|
// create internal item list
|
||||||
if Assigned(FItems) then begin;
|
if Assigned(FItems) then begin
|
||||||
NewStrings:= TExtendedStringList.Create(GetCachedDataSize);
|
NewStrings:= TExtendedStringList.Create(GetCachedDataSize);
|
||||||
|
|
||||||
// copy items (text+objects) from the interface items list
|
// copy items (text+objects) from the interface items list
|
||||||
|
@ -93,11 +93,12 @@ End;
|
|||||||
|
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TWin32ListStringList.Sort;
|
procedure TWin32ListStringList.Sort;
|
||||||
Begin
|
begin
|
||||||
// The win api doesn't allow to change the sort on the fly,
|
// The win api doesn't allow to change the sort on the fly,
|
||||||
// so is needed to recreate the window
|
// so is needed to recreate the window
|
||||||
RecreateWnd(FSender);
|
if not (csDestroyingHandle in FSender.ControlState) then
|
||||||
End;
|
RecreateWnd(FSender);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user