From aa4ccff19f3f7e2a16509d4e31d7c69caeea96c1 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine <vsavchuk@productengine.com>
Date: Mon, 19 Mar 2012 16:44:50 +0200
Subject: [PATCH] MAINT-261 FIXED Display previously retrieved data (until we
 get the update) if object inspector is invoked for the same object.

---
 indra/newview/llinspectobject.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp
index acc139c5690..a7b93b80306 100644
--- a/indra/newview/llinspectobject.cpp
+++ b/indra/newview/llinspectobject.cpp
@@ -111,6 +111,7 @@ class LLInspectObject : public LLInspect
 	
 private:
 	LLUUID				mObjectID;
+	LLUUID				mPreviousObjectID;
 	S32					mObjectFace;
 	viewer_media_t		mMediaImpl;
 	LLMediaEntry*       mMediaEntry;
@@ -249,6 +250,7 @@ void LLInspectObject::onClose(bool app_quitting)
 {
 	// Release selection to deselect
 	mObjectSelection = NULL;
+	mPreviousObjectID = mObjectID;
 
 	getChild<LLMenuButton>("gear_btn")->hideMenu();
 }
@@ -266,6 +268,13 @@ void LLInspectObject::update()
 	LLSelectNode* nodep = selection->getFirstRootNode();
 	if (!nodep) return;
 
+	// If we don't have fresh object info yet and it's the object we inspected last time,
+	// keep showing the previously retrieved data until we get the update.
+	if (!nodep->mValid && nodep->getObject()->getID() == mPreviousObjectID)
+	{
+		return;
+	}
+
 	updateButtons(nodep);
 	updateName(nodep);
 	updateDescription(nodep);
-- 
GitLab