From a00712e95133001b29fb15b15ccb6e66f2ec075b Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 26 Apr 2010 17:19:43 +0300 Subject: Fixed major bug EXT-6092 [crashhunters] Crash in LLFlatListView::selectItemPair Reason: A) incorrect UP arrow handling in accordion control: invisible accordion tab was selected to handle selection. B) invalid std::map item (in empty map) was used to make selection in Flat List Fix: added checks against empty map before use front/back item pair before selecting first/last items. Also updated processing of the UP key in accordion control to not select invisible accordion tab. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/318/ --HG-- branch : product-engine --- indra/llui/llflatlistview.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/llui/llflatlistview.cpp') diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 990bf5cd22..e0b2244654 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -744,12 +744,18 @@ LLRect LLFlatListView::getLastSelectedItemRect() void LLFlatListView::selectFirstItem () { + // No items - no actions! + if (mItemPairs.empty()) return; + selectItemPair(mItemPairs.front(), true); ensureSelectedVisible(); } void LLFlatListView::selectLastItem () { + // No items - no actions! + if (mItemPairs.empty()) return; + selectItemPair(mItemPairs.back(), true); ensureSelectedVisible(); } -- cgit v1.2.3 From 872b4d7ed0bd532e349d3c177a63d48e17d0bdb3 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 28 Apr 2010 11:00:53 +0300 Subject: Fixed critical bug EXT-4837 ( [NUX] When filter results in null state, provide a message suggesting the user try global search.) Implemented passing of entered filter substring without head spaces to search URI in help message for null filtered results. * Updated setting "no item message" to use search term from filter editor for avatar & group lists and for inventory panels. * Updated appropriate translatable strings to get [SEARCH_TERM] substitution. * Updated processing of filter substring to pass original string to methods applied new filter. Additional necessary changes * Changed place to set "no item message" for group list from refresh to where filter is updated (like in avatar lists) * Removed converting of filter substring to upper case in Places & My Appearance sidepanels (this conversion has already been implemented in where filter is applied) * Added a separate message for Landmarks to set search URI to secondlife:///app/search/places for Lanmarks panel; other inventory related panels have URL to all searched categories (secondlife:///app/search/all) Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/326/ --HG-- branch : product-engine --- indra/llui/llflatlistview.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/llui/llflatlistview.cpp') diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index e0b2244654..ec247b25c3 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -1147,12 +1147,17 @@ LLFlatListViewEx::LLFlatListViewEx(const Params& p) } -void LLFlatListViewEx::updateNoItemsMessage(bool items_filtered) +void LLFlatListViewEx::updateNoItemsMessage(const std::string& filter_string) { + bool items_filtered = !filter_string.empty(); if (items_filtered) { // items were filtered - setNoItemsCommentText(mNoFilteredItemsMsg); + LLStringUtil::format_map_t args; + args["[SEARCH_TERM]"] = LLURI::escape(filter_string); + std::string text = mNoFilteredItemsMsg; + LLStringUtil::format(text, args); + setNoItemsCommentText(text); } else { -- cgit v1.2.3