diff options
| author | Roxie Linden <roxie@lindenlab.com> | 2010-03-01 18:09:04 -0800 |
|---|---|---|
| committer | Roxie Linden <roxie@lindenlab.com> | 2010-03-01 18:09:04 -0800 |
| commit | 1147cb1afbc21e1251614895844e95bca9b6b5bc (patch) | |
| tree | da01f6c0e6b61a7c0637a371c946ea69b46f9dff /indra/newview/lllocationhistory.cpp | |
| parent | b11a625e6ff89470d25273fa426ed13f7abc4a6a (diff) | |
| parent | 0600083891ab5b2c6a79097f65945bcb2d049bed (diff) | |
Automated merge from trunk
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); } |
