summaryrefslogtreecommitdiff
path: root/indra/newview/llinspectobject.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-10-26 17:22:50 -0500
committerDave Parks <davep@lindenlab.com>2022-10-26 17:22:50 -0500
commit65eec2ca8fb34fb2aca8e93c8ce6d8e39cfae3e9 (patch)
tree3e3c9812af98bc209c274fae70f9aa8eaf2c3c90 /indra/newview/llinspectobject.cpp
parent8f47657d646c06dbba8d44497c0f81fd00730cc8 (diff)
parent800044fb33e5e177e45e1bfa9f840a287e0bd186 (diff)
Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/llinspectobject.cpp')
-rw-r--r--indra/newview/llinspectobject.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp
index 5329f10612..3d13985f08 100644
--- a/indra/newview/llinspectobject.cpp
+++ b/indra/newview/llinspectobject.cpp
@@ -116,6 +116,7 @@ private:
viewer_media_t mMediaImpl;
LLMediaEntry* mMediaEntry;
LLSafeHandle<LLObjectSelection> mObjectSelection;
+ boost::signals2::connection mSelectionUpdateSlot;
};
LLInspectObject::LLInspectObject(const LLSD& sd)
@@ -141,6 +142,10 @@ LLInspectObject::LLInspectObject(const LLSD& sd)
LLInspectObject::~LLInspectObject()
{
+ if (mSelectionUpdateSlot.connected())
+ {
+ mSelectionUpdateSlot.disconnect();
+ }
}
/*virtual*/
@@ -175,9 +180,12 @@ BOOL LLInspectObject::postBuild(void)
getChild<LLUICtrl>("more_info_btn")->setCommitCallback(
boost::bind(&LLInspectObject::onClickMoreInfo, this));
- // Watch for updates to selection properties off the network
- LLSelectMgr::getInstance()->mUpdateSignal.connect(
- boost::bind(&LLInspectObject::update, this) );
+ if (!mSelectionUpdateSlot.connected())
+ {
+ // Watch for updates to selection properties off the network
+ mSelectionUpdateSlot = LLSelectMgr::getInstance()->mUpdateSignal.connect(
+ boost::bind(&LLInspectObject::update, this));
+ }
return TRUE;
}