From 89625f92473bd2894acd287caeeb1d20673f8ddb Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 26 Oct 2022 00:41:35 +0300 Subject: SL-18444 Live Material Editor updating with selection --- indra/newview/llinspectobject.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinspectobject.cpp') 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 mObjectSelection; + boost::signals2::connection mSelectionUpdateSlot; }; LLInspectObject::LLInspectObject(const LLSD& sd) @@ -175,9 +176,12 @@ BOOL LLInspectObject::postBuild(void) getChild("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("gear_btn")->hideMenu(); } -- cgit v1.2.3 From 631b7de4b2262855984ed1d35ae7859507b12e9e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 26 Oct 2022 15:03:55 +0300 Subject: SL-18444 Either connection should be create in onOpen or disconnect happen in destructor --- indra/newview/llinspectobject.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview/llinspectobject.cpp') diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 42bf416efb..3d13985f08 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -142,6 +142,10 @@ LLInspectObject::LLInspectObject(const LLSD& sd) LLInspectObject::~LLInspectObject() { + if (mSelectionUpdateSlot.connected()) + { + mSelectionUpdateSlot.disconnect(); + } } /*virtual*/ @@ -247,11 +251,6 @@ void LLInspectObject::onClose(bool app_quitting) mObjectSelection = NULL; mPreviousObjectID = mObjectID; - if (mSelectionUpdateSlot.connected()) - { - mSelectionUpdateSlot.disconnect(); - } - getChild("gear_btn")->hideMenu(); } -- cgit v1.2.3 From c9ba8f1fce4665f19ec9485c5ceb5bfa7f290321 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 3 Feb 2023 23:56:35 +0200 Subject: SL-19109 Decouple object profiles from inventory Potentially this won't stay as sidepanels, but such rework is planned for SL-19134, for now just making it possible to open multiple instances of item profiles --- indra/newview/llinspectobject.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview/llinspectobject.cpp') diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 5329f10612..c52d0be213 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -662,9 +662,7 @@ void LLInspectObject::onClickOpen() void LLInspectObject::onClickMoreInfo() { - LLSD key; - key["task"] = "task"; - LLFloaterSidePanelContainer::showPanel("inventory", key); + LLFloaterReg::showInstance("task_properties"); closeFloater(); } -- cgit v1.2.3