Simplify RemoveFilter
This commit is contained in:
parent
9721890a3c
commit
5dcdf670be
@ -9,7 +9,7 @@ namespace LibationWinForms
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Allows filtering of the underlying SortableBindingList<GridEntry>
|
* Allows filtering of the underlying SortableBindingList<GridEntry>
|
||||||
* by implementing IBindingListView aud using SearchEngineCommands
|
* by implementing IBindingListView and using SearchEngineCommands
|
||||||
*
|
*
|
||||||
* When filtering is applied, the filtered-out items are removed
|
* When filtering is applied, the filtered-out items are removed
|
||||||
* from the base list and added to the private FilterRemoved list.
|
* from the base list and added to the private FilterRemoved list.
|
||||||
@ -93,12 +93,9 @@ namespace LibationWinForms
|
|||||||
public void RemoveFilter()
|
public void RemoveFilter()
|
||||||
{
|
{
|
||||||
if (FilterString is null) return;
|
if (FilterString is null) return;
|
||||||
|
|
||||||
for (int i = 0; i < FilterRemoved.Count; i++)
|
for (int i = 0; i < FilterRemoved.Count; i++)
|
||||||
{
|
Insert(i, FilterRemoved[i]);
|
||||||
Items.Insert(i, FilterRemoved[i]);
|
|
||||||
base.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, i));
|
|
||||||
}
|
|
||||||
|
|
||||||
FilterRemoved.Clear();
|
FilterRemoved.Clear();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user