diff options
author | Denis Serdjuk <dserduk@productengine.com> | 2010-02-25 19:15:59 +0200 |
---|---|---|
committer | Denis Serdjuk <dserduk@productengine.com> | 2010-02-25 19:15:59 +0200 |
commit | e235e71b907d7fa4d6bd15852e0a3eae3cbd07c5 (patch) | |
tree | bba20f93df8c5e92d5bcba6d2b197ed9606da8dd /indra/newview/lllocationhistory.cpp | |
parent | 087ea1cef62d383821e8e340551e757cb604b553 (diff) |
Bug Low EXT-5194 SLURL field dropdown should display empty menu rather than do nothing when empty
Solution:
Button of dropdown list will be disabled if there are no items in location history
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/lllocationhistory.cpp')
-rw-r--r-- | indra/newview/lllocationhistory.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp index df93930d33..7906d9b20f 100644 --- a/indra/newview/lllocationhistory.cpp +++ b/indra/newview/lllocationhistory.cpp @@ -63,6 +63,7 @@ void LLLocationHistory::addItem(const LLLocationHistoryItem& item) { mItems.erase(mItems.begin(), mItems.end()-max_items); } llassert((S32)mItems.size() <= max_items); + mChangedSignal(ADD); } /* @@ -87,9 +88,10 @@ bool LLLocationHistory::touchItem(const LLLocationHistoryItem& item) { void LLLocationHistory::removeItems() { mItems.clear(); + mChangedSignal(CLEAR); } -bool LLLocationHistory::getMatchingItems(std::string substring, location_list_t& result) const +bool LLLocationHistory::getMatchingItems(const std::string& substring, location_list_t& result) const { // *TODO: an STL algorithm would look nicer result.clear(); @@ -160,7 +162,7 @@ void LLLocationHistory::load() return; } - removeItems(); + mItems.clear();// need to use a direct call of clear() method to avoid signal invocation // add each line in the file to the list std::string line; @@ -179,5 +181,5 @@ void LLLocationHistory::load() file.close(); - mLoadedSignal(); + mChangedSignal(LOAD); } |