summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2020-11-04 18:53:56 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2020-11-04 18:53:56 +0200
commitb484a2736524dc52ef81dd3e3d25ee0970674fd4 (patch)
tree128ffaffe7242a88bc5cd08a5476d8b278aac407 /indra/newview/llpanelmaininventory.cpp
parent0fd4b3b9ae8b1e95f73b3ad2697b8782ce97794e (diff)
SL-13826 Open a new inventory floater for "Find original" and "Show original" result
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 4691ee3849..813a5b3c20 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -383,15 +383,16 @@ void LLPanelMainInventory::closeAllFolders()
getPanel()->getRootFolder()->closeAllFolders();
}
-void LLPanelMainInventory::newWindow()
+LLFloaterSidePanelContainer* LLPanelMainInventory::newWindow()
{
static S32 instance_num = 0;
instance_num = (instance_num + 1) % S32_MAX;
if (!gAgentCamera.cameraMouselook())
{
- LLFloaterReg::showTypedInstance<LLFloaterSidePanelContainer>("inventory", LLSD(instance_num));
+ return LLFloaterReg::showTypedInstance<LLFloaterSidePanelContainer>("inventory", LLSD(instance_num));
}
+ return NULL;
}
void LLPanelMainInventory::doCreate(const LLSD& userdata)
@@ -1343,7 +1344,15 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata)
{
return;
}
- static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->performAction(getActivePanel()->getModel(), "goto");
+ LLSidepanelInventory *sidepanel_inventory = newWindow()->LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+ if (sidepanel_inventory)
+ {
+ LLPanelMainInventory* new_inventory = sidepanel_inventory->getMainInventoryPanel();
+ if (new_inventory)
+ {
+ static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->performAction(new_inventory->getActivePanel()->getModel(), "goto");
+ }
+ }
}
if (command_name == "find_links")