summaryrefslogtreecommitdiff
path: root/indra/newview/llinspectobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinspectobject.cpp')
-rw-r--r--indra/newview/llinspectobject.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp
index ee076f68ea..a7b93b8030 100644
--- a/indra/newview/llinspectobject.cpp
+++ b/indra/newview/llinspectobject.cpp
@@ -28,6 +28,7 @@
#include "llinspectobject.h"
// Viewer
+#include "llfloatersidepanelcontainer.h"
#include "llinspect.h"
#include "llmediaentry.h"
#include "llnotificationsutil.h" // *TODO: Eliminate, add LLNotificationsUtil wrapper
@@ -45,7 +46,6 @@
#include "llmenubutton.h"
#include "llresmgr.h" // getMonetaryString
#include "llsafehandle.h"
-#include "llsidetray.h"
#include "lltextbox.h" // for description truncation
#include "lltoggleablemenu.h"
#include "lltrans.h"
@@ -111,6 +111,7 @@ private:
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);
@@ -640,7 +649,7 @@ void LLInspectObject::onClickMoreInfo()
{
LLSD key;
key["task"] = "task";
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
+ LLFloaterSidePanelContainer::showPanel("inventory", key);
closeFloater();
}