mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-26 22:48:23 +02:00
ListFilterEdit: Allow using with TCustomCheckListBox descendants. Issue #22968, patch from Silvio Clécio
git-svn-id: trunk@38818 -
This commit is contained in:
parent
6b90fc2348
commit
09a91920b3
@ -82,7 +82,7 @@ begin
|
|||||||
fOriginalData:=TStringList.Create;
|
fOriginalData:=TStringList.Create;
|
||||||
fSelectionList:=TStringList.Create;
|
fSelectionList:=TStringList.Create;
|
||||||
fSortedData:=TStringList.Create;
|
fSortedData:=TStringList.Create;
|
||||||
if Assigned(fFilteredListbox) and (fFilteredListbox is TCheckListBox) then
|
if Assigned(fFilteredListbox) and (fFilteredListbox is TCustomCheckListBox) then
|
||||||
Assert(Assigned(fCheckedItems), 'TListFilterEdit.Create: fCheckedItems=nil');
|
Assert(Assigned(fCheckedItems), 'TListFilterEdit.Create: fCheckedItems=nil');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ begin
|
|||||||
fFilteredListbox:=AValue;
|
fFilteredListbox:=AValue;
|
||||||
if Assigned(fFilteredListbox) then begin
|
if Assigned(fFilteredListbox) then begin
|
||||||
fOriginalData.Assign(fFilteredListbox.Items);
|
fOriginalData.Assign(fFilteredListbox.Items);
|
||||||
if (fFilteredListbox is TCheckListBox) and not Assigned(fCheckedItems) then
|
if (fFilteredListbox is TCustomCheckListBox) and not Assigned(fCheckedItems) then
|
||||||
fCheckedItems:=TStringMap.Create(False);
|
fCheckedItems:=TStringMap.Create(False);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user