diff --git a/indra/newview/fsradar.cpp b/indra/newview/fsradar.cpp index 0277474047..3d6a871277 100644 --- a/indra/newview/fsradar.cpp +++ b/indra/newview/fsradar.cpp @@ -1066,3 +1066,12 @@ void FSRadar::updateAgeAlertCheck() it->second->checkAge(); } } + +void FSRadar::updateNotes(const LLUUID& avatar_id, const std::string& notes) +{ + FSRadarEntry* entry = getEntry(avatar_id); + if (entry) + { + entry->setNotes(notes); + } +} diff --git a/indra/newview/fsradar.h b/indra/newview/fsradar.h index 44356924e8..f742c39fca 100644 --- a/indra/newview/fsradar.h +++ b/indra/newview/fsradar.h @@ -72,6 +72,7 @@ public: void requestRadarChannelAlertSync(); void updateNames(); void updateName(const LLUUID& avatar_id); + void updateNotes(const LLUUID& avatar_id, const std::string& notes); static void onRadarNameFmtClicked(const LLSD& userdata); static bool radarNameFmtCheck(const LLSD& userdata); diff --git a/indra/newview/fsradarentry.cpp b/indra/newview/fsradarentry.cpp index ef911faa58..84c09a5176 100644 --- a/indra/newview/fsradarentry.cpp +++ b/indra/newview/fsradarentry.cpp @@ -126,8 +126,7 @@ void FSRadarEntry::processProperties(void* data, EAvatarProcessorType type) LLAvatarNotes* avatar_notes = static_cast(data); if (avatar_notes && avatar_notes->agent_id == gAgentID && avatar_notes->target_id == mID && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) { - mNotes = avatar_notes->notes; - LLStringUtil::trim(mNotes); + setNotes(avatar_notes->notes); } } } @@ -191,3 +190,9 @@ void FSRadarEntry::checkAge() mAgeAlertPerformed = true; } } + +void FSRadarEntry::setNotes(const std::string& notes) +{ + mNotes = notes; + LLStringUtil::trim(mNotes); +} diff --git a/indra/newview/fsradarentry.h b/indra/newview/fsradarentry.h index 30c1599378..b369115517 100644 --- a/indra/newview/fsradarentry.h +++ b/indra/newview/fsradarentry.h @@ -63,6 +63,8 @@ public: static std::string getRadarName(const LLAvatarName& av_name); + void setNotes(const std::string& notes); + private: void updateName(); void onAvatarNameCache(const LLUUID& av_id, const LLAvatarName& av_name); diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 48dc4f547f..d7b703034f 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -81,6 +81,7 @@ #include "llviewernetwork.h" // For LLGridManager #include "fsdata.h" +#include "fsradar.h" // Update notes in radar when edited #include "llviewermenu.h" static LLPanelInjector t_panel_profile_secondlife("panel_profile_secondlife"); @@ -3145,6 +3146,8 @@ void LLPanelProfileNotes::onSaveNotesChanges() LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL; } + FSRadar::getInstance()->updateNotes(getAvatarId(), mCurrentNotes); // Update notes in radar when edited + mSaveChanges->setEnabled(FALSE); mDiscardChanges->setEnabled(FALSE); mHasUnsavedChanges = false;