From c437c3b5b50fa05727435a37c37f79c34428d2a7 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Thu, 19 Jan 2012 20:34:31 +0200 Subject: EXP-1815 FIXED Favorites list in login screen not populated when display names are disabled. * Fixed LLAvatarName::getLegacyName() to work when display names are disabled (it used to return ' ', i.e. empty first and last name separated with a space). * Added some debugging messages. --- indra/newview/llviewerinventory.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerinventory.cpp') diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 163581ea7f..cf52b5165b 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1462,6 +1462,7 @@ const std::string& LLViewerInventoryItem::getName() const class LLFavoritesOrderStorage : public LLSingleton , public LLDestroyClass { + LOG_CLASS(LLFavoritesOrderStorage); public: /** * Sets sort index for specified with LLUUID favorite landmark @@ -1620,10 +1621,18 @@ void LLFavoritesOrderStorage::load() void LLFavoritesOrderStorage::saveFavoritesSLURLs() { // Do not change the file if we are not logged in yet. - if (!LLLoginInstance::getInstance()->authSuccess()) return; + if (!LLLoginInstance::getInstance()->authSuccess()) + { + llwarns << "Cannot save favorites: not logged in" << llendl; + return; + } std::string user_dir = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""); - if (user_dir.empty()) return; + if (user_dir.empty()) + { + llwarns << "Cannot save favorites: empty user dir name" << llendl; + return; + } std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); llifstream in_file; @@ -1649,13 +1658,19 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]); if (slurl_iter != mSLURLs.end()) { + lldebugs << "Saving favorite: idx=" << (*it)->getSortField() << ", SLURL=" << slurl_iter->second << ", value=" << value << llendl; value["slurl"] = slurl_iter->second; user_llsd[(*it)->getSortField()] = value; } + else + { + llwarns << "Not saving favorite " << value["name"] << ": no matching SLURL" << llendl; + } } LLAvatarName av_name; LLAvatarNameCache::get( gAgentID, &av_name ); + lldebugs << "Saved favorites for " << av_name.getLegacyName() << llendl; fav_llsd[av_name.getLegacyName()] = user_llsd; llofstream file; @@ -1674,6 +1689,7 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() LLAvatarName av_name; LLAvatarNameCache::get( gAgentID, &av_name ); + lldebugs << "Removed favorites for " << av_name.getLegacyName() << llendl; if (fav_llsd.has(av_name.getLegacyName())) { fav_llsd.erase(av_name.getLegacyName()); @@ -1706,6 +1722,7 @@ void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmar void LLFavoritesOrderStorage::storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl) { + lldebugs << "Saving landmark SLURL: " << slurl << llendl; mSLURLs[asset_id] = slurl; } -- cgit v1.2.3