@@ -276,21 +276,24 @@ class NetworkContentListWindow : public
/** Filter the content list */
void FilterContentList()
{
if (!this->content.Filter(this->edit_str_buf)) return;
this->selected = NULL;
this->list_pos = 0;
/* update list position */
for (ConstContentIterator iter = this->content.Begin(); iter != this->content.End(); iter++) {
if (*iter == this->selected) {
this->list_pos = iter - this->content.Begin();
break;
this->ScrollToSelected();
return;
}
/* previously selected item not in list anymore */
/** Make sure that the currently selected content info is within the visible part of the matrix */
void ScrollToSelected()
if (this->selected == NULL) return;
@@ -318,22 +318,24 @@ public:
*/
bool Filter(FilterFunction *decide, F filter_data)
/* Do not filter if the filter bit is not set */
if (!HASBITS(this->flags, VL_FILTER)) return false;
bool changed = false;
for (uint iter = 0; iter < this->items;) {
T *item = &this->data[iter];
if (!decide(item, filter_data)) {
this->Erase(item);
changed = true;
} else {
iter++;
return true;
return changed;
/**
* Hand the array of filter function pointers to the sort list
*
* @param n_funcs The pointer to the first filter func
Status change: