diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-28 12:41:34 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-28 12:41:34 +0100 |
commit | 47fa4bc01478d5ef0311aa491321bfb397777302 (patch) | |
tree | 7d9ab0c14c56ece7b178dc9d8ab67633cd476af0 /indra/llui/llflatlistview.cpp | |
parent | b740924c9dbb6a5697254ca238e099a62e7054a9 (diff) | |
parent | 96df3f3eb1351973d140ba73b507de44b1052c89 (diff) |
merge from viewer-trunk
Diffstat (limited to 'indra/llui/llflatlistview.cpp')
-rw-r--r-- | indra/llui/llflatlistview.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 990bf5cd22..ec247b25c3 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(); } @@ -1141,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 { |