From f499f0805fa7e38deeca1b6c6c9edd4821ec8a08 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 25 Jan 2023 12:59:32 +0100 Subject: [PATCH] FIRE-32306: Fix the fix --- indra/newview/llpanelprofile.cpp | 46 ++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 57751adbd1..48dc4f547f 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -2235,7 +2235,7 @@ void LLPanelProfileSecondLife::onSaveDescriptionChanges() } // Restore UDP profiles #ifdef OPENSIM - else if(LLGridManager::getInstance()->isInOpenSim()) + else if (LLGridManager::getInstance()->isInOpenSim()) { if (getIsLoaded() && getSelfProfile()) { @@ -2482,7 +2482,7 @@ void LLPanelProfileSecondLife::onCommitProfileImage(const LLUUID& id) { // Make OpenSim profiles work again #ifdef OPENSIM - if(LLGridManager::getInstance()->isInOpenSim()) + if (LLGridManager::getInstance()->isInOpenSim()) { mImageId = id; // save immediately only if description changes are not pending. @@ -2870,7 +2870,7 @@ void LLPanelProfileFirstLife::onCommitPhoto(const LLUUID& id) { // Make OpenSim profiles work again #ifdef OPENSIM - if(LLGridManager::getInstance()->isInOpenSim()) + if (LLGridManager::getInstance()->isInOpenSim()) { mImageId = id; mImageId = id; @@ -2915,7 +2915,7 @@ void LLPanelProfileFirstLife::onSaveDescriptionChanges() } // Restore UDP profiles #ifdef OPENSIM - else if(LLGridManager::getInstance()->isInOpenSim()) + else if (LLGridManager::getInstance()->isInOpenSim()) { if (getIsLoaded() && getSelfProfile()) { @@ -3069,7 +3069,7 @@ void LLPanelProfileNotes::updateData() } // Restore UDO profiles #ifdef OPENSIM - else + else if(LLGridManager::instance().isInOpenSim()) { LLAvatarPropertiesProcessor::getInstance()->sendAvatarNotesRequest(avatar_id); } @@ -3134,17 +3134,16 @@ void LLPanelProfileNotes::onSaveNotesChanges() } // Restore UDO profiles #ifdef OPENSIM - else - { - LLAvatarPropertiesProcessor::getInstance()->sendNotes(getAvatarId(), mCurrentNotes); - } -#else -// + else if (LLGridManager::instance().isInOpenSim()) + { + LLAvatarPropertiesProcessor::getInstance()->sendNotes(getAvatarId(), mCurrentNotes); + } +#endif +// else { LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL; } -#endif // mSaveChanges->setEnabled(FALSE); mDiscardChanges->setEnabled(FALSE); @@ -3261,18 +3260,23 @@ void LLPanelProfile::updateData() { // Restore UDP profiles #ifdef OPENSIM - mPanelSecondlife->updateData(); - mPanelPicks->updateData(); - mPanelFirstlife->updateData(); - mPanelNotes->updateData(); -#else + if (LLGridManager::instance().isInOpenSim()) + { + mPanelSecondlife->updateData(); + mPanelPicks->updateData(); + mPanelFirstlife->updateData(); + mPanelNotes->updateData(); + } + else +#endif + { // setIsLoading(); mPanelSecondlife->setIsLoading(); mPanelPicks->setIsLoading(); mPanelFirstlife->setIsLoading(); mPanelNotes->setIsLoading(); -#endif // restore udp profiles + } // restore udp profiles std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP); if (!cap_url.empty()) { @@ -3280,10 +3284,12 @@ void LLPanelProfile::updateData() boost::bind(request_avatar_properties_coro, cap_url, avatar_id)); } // Restore UDP profiles - else +#ifdef OPENSIM + else if (LLGridManager::instance().isInOpenSim()) { LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(avatar_id); } +#endif // } } @@ -3341,7 +3347,7 @@ void LLPanelProfile::commitUnsavedChanges() mPanelNotes->commitUnsavedChanges(); // restore UDP - this is effectvely the apply() method from the previous incarnation #ifdef OPENSIM - if ( (gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP).empty()) && getSelfProfile() ) + if (LLGridManager::instance().isInOpenSim() && (gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP).empty()) && getSelfProfile()) { //KC - Avatar data is spread over 3 different panels // collect data from the last 2 and give to the first to save