diff options
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index c65998cf90..740c27ae8b 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -339,6 +339,7 @@ void LLInventoryPanel::draw() { // Select the desired item (in case it wasn't loaded when the selection was requested) updateSelection(); + updateFolderState(); LLPanel::draw(); } @@ -1146,6 +1147,7 @@ void LLInventoryPanel::setSelectCallback(const boost::function<void (const std:: void LLInventoryPanel::clearSelection() { mSelectThisID.setNull(); + mOpenFolderID.setNull(); } LLInventoryPanel::selected_items_t LLInventoryPanel::getSelectedItems() const @@ -1646,6 +1648,30 @@ void LLInventoryPanel::updateSelection() } } +void LLInventoryPanel::openFolderByID( const LLUUID& folder_id) +{ + LLFolderViewItem* itemp = getItemByID(folder_id); + if(itemp && itemp->getViewModelItem()) + { + itemp->setOpen(TRUE); + mOpenFolderID.setNull(); + return; + } + else + { + // save the desired folder to be open later (if/when ready) + mOpenFolderID = folder_id; + } +} + +void LLInventoryPanel::updateFolderState() +{ + if (mOpenFolderID.notNull()) + { + openFolderByID(mOpenFolderID); + } +} + void LLInventoryPanel::doToSelected(const LLSD& userdata) { if (("purge" == userdata.asString())) |