diff options
author | Leslie Linden <none@none> | 2011-04-06 14:38:55 -0700 |
---|---|---|
committer | Leslie Linden <none@none> | 2011-04-06 14:38:55 -0700 |
commit | 4dd471d055bea672f5eb21cfcc4d07e6b3ba3f9b (patch) | |
tree | 894ea4c409f42aee39109fb68ca09539dd674fa4 /indra/newview/llfloaterpreference.cpp | |
parent | 81ae3c5fc984a5175f1bd0fc277f8493dc895d94 (diff) |
WEB-3750 FIX - Gone profile
* Added agent validation around calls to update avatar data
* Removed references to profile panel save options
Reviewed by Richard
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 724096b443..1dc1aa49ea 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -285,6 +285,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mGotPersonalInfo(false), mOriginalIMViaEmail(false), mLanguageChanged(false), + mAvatarDataInitialized(false), mDoubleClickActionDirty(false), mFavoritesRecordMayExist(false) { @@ -353,14 +354,19 @@ void LLFloaterPreference::processProperties( void* pData, EAvatarProcessorType t void LLFloaterPreference::storeAvatarProperties( const LLAvatarData* pAvatarData ) { - mAvatarProperties.avatar_id = gAgent.getID(); - mAvatarProperties.image_id = pAvatarData->image_id; - mAvatarProperties.fl_image_id = pAvatarData->fl_image_id; - mAvatarProperties.about_text = pAvatarData->about_text; - mAvatarProperties.fl_about_text = pAvatarData->fl_about_text; - mAvatarProperties.profile_url = pAvatarData->profile_url; - mAvatarProperties.flags = pAvatarData->flags; - mAvatarProperties.allow_publish = pAvatarData->flags & AVATAR_ALLOW_PUBLISH; + if (gAgent.isInitialized() && (gAgent.getID() != LLUUID::null)) + { + mAvatarProperties.avatar_id = gAgent.getID(); + mAvatarProperties.image_id = pAvatarData->image_id; + mAvatarProperties.fl_image_id = pAvatarData->fl_image_id; + mAvatarProperties.about_text = pAvatarData->about_text; + mAvatarProperties.fl_about_text = pAvatarData->fl_about_text; + mAvatarProperties.profile_url = pAvatarData->profile_url; + mAvatarProperties.flags = pAvatarData->flags; + mAvatarProperties.allow_publish = pAvatarData->flags & AVATAR_ALLOW_PUBLISH; + + mAvatarDataInitialized = true; + } } void LLFloaterPreference::processProfileProperties(const LLAvatarData* pAvatarData ) @@ -371,12 +377,15 @@ void LLFloaterPreference::processProfileProperties(const LLAvatarData* pAvatarDa void LLFloaterPreference::saveAvatarProperties( void ) { mAvatarProperties.allow_publish = getChild<LLUICtrl>("online_searchresults")->getValue(); - if ( mAvatarProperties.allow_publish ) + if (mAvatarProperties.allow_publish) { mAvatarProperties.flags |= AVATAR_ALLOW_PUBLISH; } - - LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate( &mAvatarProperties ); + + if (mAvatarDataInitialized) + { + LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate( &mAvatarProperties ); + } } |