summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
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")