diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-10-26 00:41:35 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-10-26 00:41:59 +0300 |
commit | 89625f92473bd2894acd287caeeb1d20673f8ddb (patch) | |
tree | 178c26092ee581ffacef9657462a75a94e5aa1a4 /indra/newview/llinspectobject.cpp | |
parent | ca53f265b45b01378748039d2345005688545114 (diff) |
SL-18444 Live Material Editor updating with selection
Diffstat (limited to 'indra/newview/llinspectobject.cpp')
-rw-r--r-- | indra/newview/llinspectobject.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 5329f10612..42bf416efb 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) @@ -175,9 +176,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; } @@ -243,6 +247,11 @@ void LLInspectObject::onClose(bool app_quitting) mObjectSelection = NULL; mPreviousObjectID = mObjectID; + if (mSelectionUpdateSlot.connected()) + { + mSelectionUpdateSlot.disconnect(); + } + getChild<LLMenuButton>("gear_btn")->hideMenu(); } |