summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermarketplacelistings.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-02-03 23:56:35 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-02-03 23:56:35 +0200
commitc9ba8f1fce4665f19ec9485c5ceb5bfa7f290321 (patch)
tree5705719b7db382a3d1bf79def9179a39ebfb13db /indra/newview/llfloatermarketplacelistings.cpp
parent2f4902967ad44c7ca670da11ee05daf8c43a895c (diff)
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
Diffstat (limited to 'indra/newview/llfloatermarketplacelistings.cpp')
-rw-r--r--indra/newview/llfloatermarketplacelistings.cpp30
1 files changed, 24 insertions, 6 deletions
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp
index e755e9924c..478b6a9a50 100644
--- a/indra/newview/llfloatermarketplacelistings.cpp
+++ b/indra/newview/llfloatermarketplacelistings.cpp
@@ -41,6 +41,7 @@
#include "llnotificationmanager.h"
#include "llnotificationsutil.h"
#include "llsidepaneliteminfo.h"
+#include "llsidepaneltaskinfo.h"
#include "lltextbox.h"
#include "lltrans.h"
@@ -955,17 +956,34 @@ LLFloaterItemProperties::~LLFloaterItemProperties()
BOOL LLFloaterItemProperties::postBuild()
{
// On the standalone properties floater, we have no need for a back button...
- LLSidepanelItemInfo* panel = getChild<LLSidepanelItemInfo>("item_panel");
- LLButton* back_btn = panel->getChild<LLButton>("back_btn");
- back_btn->setVisible(FALSE);
-
+ LLSidepanelInventorySubpanel* panel = findChild<LLSidepanelInventorySubpanel>("sidepanel");
+ if (panel)
+ {
+ LLButton* back_btn = panel->getChild<LLButton>("back_btn");
+ back_btn->setVisible(FALSE);
+ }
return LLFloater::postBuild();
}
void LLFloaterItemProperties::onOpen(const LLSD& key)
{
// Tell the panel which item it needs to visualize
- LLSidepanelItemInfo* panel = getChild<LLSidepanelItemInfo>("item_panel");
- panel->setItemID(key["id"].asUUID());
+ LLSidepanelInventorySubpanel* panel = findChild<LLSidepanelInventorySubpanel>("sidepanel");
+
+ LLSidepanelItemInfo* item_panel = dynamic_cast<LLSidepanelItemInfo*>(panel);
+ if (item_panel)
+ {
+ item_panel->setItemID(key["id"].asUUID());
+ if (key.has("object"))
+ {
+ item_panel->setObjectID(key["object"].asUUID());
+ }
+ }
+
+ LLSidepanelTaskInfo* task_panel = dynamic_cast<LLSidepanelTaskInfo*>(panel);
+ if (task_panel)
+ {
+ task_panel->setObjectSelection(LLSelectMgr::getInstance()->getSelection());
+ }
}