From d66c730c30cb8d8734f384cf1b9776f0f51c9f9f Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Mon, 22 Jul 2019 23:38:45 -0400 Subject: [PATCH] Back down on overzealous list filter checking and explicitly default filter For clarity to others in the future: getFiltered() checks are meant for functions where the user is interacting the scroll list in some way or we're displaying the scroll list. --- indra/llui/llscrolllistctrl.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index ef1fe5214..feff91dfb 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -159,6 +159,7 @@ LLScrollListCtrl::LLScrollListCtrl(const std::string& name, const LLRect& rect, mFgUnselectedColor(LLUI::sColorsGroup->getColor("ScrollUnselectedColor")), mFgDisabledColor(LLUI::sColorsGroup->getColor("ScrollDisabledColor")), mHighlightedColor(LLUI::sColorsGroup->getColor("ScrollHighlightedColor")), + mFilter(), mSearchColumn(0), mColumnPadding(5) { @@ -829,22 +830,19 @@ BOOL LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index ) continue ; } - if (itemp->getFiltered()) + if (index >= first_index && index <= last_index) { - if (index >= first_index && index <= last_index) + if (itemp->getEnabled()) { - if (itemp->getEnabled()) - { - selectItem(itemp, FALSE); - success = TRUE; - } + selectItem(itemp, FALSE); + success = TRUE; } - else - { - deselectItem(itemp); - } - index++; } + else + { + deselectItem(itemp); + } + index++; iter++ ; } @@ -1203,7 +1201,6 @@ LLScrollListItem* LLScrollListCtrl::getItemByLabel(const std::string& label, BOO for (iter = mItemList.begin(); iter != mItemList.end(); iter++) { LLScrollListItem* item = *iter; - if (item->getFiltered()) continue; std::string item_text = item->getColumn(column)->getValue().asString(); // Only select enabled items with matching names if (!case_sensitive)