summaryrefslogtreecommitdiff
path: root/indra/newview/llfavoritesbar.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-03-16 13:08:06 -0400
committerOz Linden <oz@lindenlab.com>2016-03-16 13:08:06 -0400
commit31f3db02919870a8e92c9452de477c1478b273e9 (patch)
tree1acf6944bf8dbe0b67bb64caee9188ad5e36d913 /indra/newview/llfavoritesbar.cpp
parent0b996159cef3a4022c6a3d4691bd2e2db37b6e92 (diff)
parent9197a8652e49178c63ea208c6c4acf1ca3433659 (diff)
merge changes for DRTVWR-417
Diffstat (limited to 'indra/newview/llfavoritesbar.cpp')
-rw-r--r--indra/newview/llfavoritesbar.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index b779d8f461..d614d612ff 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -969,6 +969,7 @@ BOOL LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &it
{
LLFavoritesOrderStorage::instance().setSortIndex((*i), ++sortField);
}
+ LLFavoritesOrderStorage::instance().mSaveOnExit = true;
}
return TRUE;
@@ -1530,10 +1531,10 @@ void LLFavoritesOrderStorage::destroyClass()
{
file.close();
LLFile::remove(filename);
- if(mSaveOnExit)
- {
- LLFavoritesOrderStorage::instance().saveFavoritesRecord(true);
- }
+ }
+ if(mSaveOnExit)
+ {
+ LLFavoritesOrderStorage::instance().saveFavoritesRecord(true);
}
}
@@ -1799,6 +1800,16 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
}
}
+ for (std::set<LLUUID>::iterator it = mMissingSLURLs.begin(); it != mMissingSLURLs.end(); it++)
+ {
+ slurls_map_t::iterator slurl_iter = mSLURLs.find(*it);
+ if (slurl_iter != mSLURLs.end())
+ {
+ pref_changed = true;
+ break;
+ }
+ }
+
if((items != mPrevFavorites) || name_changed || pref_changed)
{
std::string filename = getStoredFavoritesFilename();
@@ -1819,6 +1830,7 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
LLSD user_llsd;
S32 fav_iter = 0;
+ mMissingSLURLs.clear();
for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++)
{
LLSD value;
@@ -1836,8 +1848,10 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
else
{
getSLURL((*it)->getAssetUUID());
+ value["slurl"] = "";
+ user_llsd[fav_iter] = value;
mUpdateRequired = true;
- return FALSE;
+ mMissingSLURLs.insert((*it)->getAssetUUID());
}
}
else
@@ -1868,7 +1882,6 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
<< "' at '" << filename << "' " << LL_ENDL;
}
}
-
mPrevFavorites = items;
}