diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-11-30 17:47:58 +0100 |
---|---|---|
committer | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-12-05 03:37:06 +0100 |
commit | c9cd5631e4b149f83c5a49c8fbf869cf2fb5b6a7 (patch) | |
tree | d09566a4132530ea65574a886540e0f258103017 /indra/newview/llinspectobject.cpp | |
parent | 54db4206e9302e7510bc4f103ff59714c1be942d (diff) | |
parent | 683bf84bb38adc88d4a4b7fedaed89b41fcac45e (diff) |
Merge branch 'main' into DRTVWR-489
Diffstat (limited to 'indra/newview/llinspectobject.cpp')
-rw-r--r-- | indra/newview/llinspectobject.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index c52d0be213..491c90c571 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; } |