LazControls: Reset filtering correctly by FilterEdits when the control is detached. Issue #41321.

This commit is contained in:
Juha 2025-03-07 09:53:25 +02:00
parent cf948b040d
commit e8fa62c8e7
3 changed files with 3 additions and 6 deletions

View File

@ -143,8 +143,7 @@ begin
if Assigned(fFilteredListbox) then if Assigned(fFilteredListbox) then
begin begin
fFilteredListbox.RemoveFreeNotification(Self); fFilteredListbox.RemoveFreeNotification(Self);
InternalSetFilter(''); ForceFilter('');
ApplyFilter(True);
end; end;
fFilteredListbox:=AValue; fFilteredListbox:=AValue;
if Assigned(fFilteredListbox) then if Assigned(fFilteredListbox) then

View File

@ -154,8 +154,7 @@ begin
if Assigned(fFilteredListview) then if Assigned(fFilteredListview) then
begin begin
fFilteredListview.RemoveFreeNotification(Self); fFilteredListview.RemoveFreeNotification(Self);
InternalSetFilter(''); ForceFilter('');
ApplyFilter(True);
end; end;
fFilteredListview := AValue; fFilteredListview := AValue;
if Assigned(fFilteredListview) then if Assigned(fFilteredListview) then

View File

@ -727,8 +727,7 @@ begin
begin begin
fFilteredTreeview.RemoveFreeNotification(Self); fFilteredTreeview.RemoveFreeNotification(Self);
fFilteredTreeview.RemoveHandlerOnBeforeDestruction(@OnBeforeTreeDestroy); fFilteredTreeview.RemoveHandlerOnBeforeDestruction(@OnBeforeTreeDestroy);
InternalSetFilter(''); ForceFilter('');
ApplyFilter(True);
end; end;
fFilteredTreeview := AValue; fFilteredTreeview := AValue;
if fFilteredTreeview <> nil then if fFilteredTreeview <> nil then