summaryrefslogtreecommitdiff
path: root/indra/newview/llfavoritesbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfavoritesbar.cpp')
-rwxr-xr-xindra/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 100755
--- 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;
}