diff options
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 30 | ||||
-rw-r--r-- | indra/newview/llpanelmaininventory.h | 1 |
2 files changed, 31 insertions, 0 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 6b9e04840d..a3ac64aee8 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -415,8 +415,33 @@ void LLPanelMainInventory::newWindow() } } +//static void LLPanelMainInventory::newFolderWindow(LLUUID folder_id, LLUUID item_to_select) { + LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); + for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end();) + { + LLFloaterSidePanelContainer* inventory_container = dynamic_cast<LLFloaterSidePanelContainer*>(*iter++); + if (inventory_container) + { + LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(inventory_container->findChild<LLPanel>("main_panel", true)); + if (sidepanel_inventory) + { + LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel(); + if (main_inventory && main_inventory->isSingleFolderMode() + && (main_inventory->getSingleFolderViewRoot() == folder_id)) + { + main_inventory->setFocus(true); + if(item_to_select.notNull()) + { + sidepanel_inventory->getActivePanel()->setSelection(item_to_select, TAKE_FOCUS_YES); + } + return; + } + } + } + } + S32 instance_num = get_instance_num(); LLFloaterSidePanelContainer* inventory_container = LLFloaterReg::showTypedInstance<LLFloaterSidePanelContainer>("inventory", LLSD(instance_num)); @@ -1346,6 +1371,11 @@ void LLPanelMainInventory::setSingleFolderViewRoot(const LLUUID& folder_id, bool } } +LLUUID LLPanelMainInventory::getSingleFolderViewRoot() +{ + return mSingleFolderPanelInventory->getSingleFolderRoot(); +} + void LLPanelMainInventory::showActionMenu(LLMenuGL* menu, std::string spawning_view_name) { if (menu) diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 7edaf7db96..b0f520ac5e 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -104,6 +104,7 @@ public: void onBackFolderClicked(); void onForwardFolderClicked(); void setSingleFolderViewRoot(const LLUUID& folder_id, bool clear_nav_history = true); + LLUUID getSingleFolderViewRoot(); bool isSingleFolderMode() { return mSingleFolderMode; } protected: |