Anonymous avatar Anonymous committed b758ddc

STORM-1799 Object doesn't appear in Block list if trying to block from Remote object inspector

Comments (0)

Files changed (2)

doc/contributions.txt

 	STORM-1737
 	STORM-1733
 	STORM-1790
+	STORM-1799
 Kadah Coba
 	STORM-1060
 Jondan Lundquist

indra/newview/llinspectremoteobject.cpp

 	
 private:
 	void update();
-	void onNameCache(const LLUUID& id, const std::string& name, bool is_group);
 	
 private:
 	LLUUID		 mObjectID;
 	LLUUID		 mOwnerID;
-	std::string  mOwnerLegacyName;
 	std::string  mSLurl;
 	std::string  mName;
 	bool         mGroupOwned;
 	LLInspect(LLSD()),
 	mObjectID(NULL),
 	mOwnerID(NULL),
-	mOwnerLegacyName(),
 	mSLurl(""),
 	mName(""),
 	mGroupOwned(false)
 	mGroupOwned = data["group_owned"].asBoolean();
 	mSLurl      = data["slurl"].asString();
 
-	// work out the owner's name
-	mOwnerLegacyName = "";
-	if (gCacheName)
-	{
-		gCacheName->get(mOwnerID, mGroupOwned,  // muting
-			boost::bind(&LLInspectRemoteObject::onNameCache, this, _1, _2, _3));
-	}
-
 	// update the inspector with the current object state
 	update();
 
 
 void LLInspectRemoteObject::onClickBlock()
 {
-	LLMute::EType mute_type = mGroupOwned ? LLMute::GROUP : LLMute::AGENT;
-	LLMute mute(mOwnerID, mOwnerLegacyName, mute_type);
+	LLMute mute(mObjectID, mName, LLMute::OBJECT);
 	LLMuteList::getInstance()->add(mute);
 	LLPanelBlockedList::showPanelAndSelect(mute.mID);
 	closeFloater();
 	closeFloater();
 }
 
-void LLInspectRemoteObject::onNameCache(const LLUUID& id, const std::string& name, bool is_group)
-{
-	mOwnerLegacyName = name;
-	update();
-}
-
 void LLInspectRemoteObject::update()
 {
 	// show the object name as the inspector's title
 	// disable the Map button if we don't have a SLurl
 	getChild<LLUICtrl>("map_btn")->setEnabled(! mSLurl.empty());
 
-	// disable the Block button if we don't have the owner ID
-	getChild<LLUICtrl>("block_btn")->setEnabled(! mOwnerID.isNull());
+	// disable the Block button if we don't have the object ID (will this ever happen?)
+	getChild<LLUICtrl>("block_btn")->setEnabled(! mObjectID.isNull());
 }
 
 //////////////////////////////////////////////////////////////////////////////
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.