diff options
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 4b525b09d1..2c7c6d2056 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -2080,6 +2080,7 @@ LLInventorySingleFolderPanel::LLInventorySingleFolderPanel(const Params& params) getFilter().setDefaultEmptyLookupMessage("InventorySingleFolderEmpty"); mCommitCallbackRegistrar.add("Inventory.OpenSelectedFolder", boost::bind(&LLInventorySingleFolderPanel::openInCurrentWindow, this, _2)); + mCommitCallbackRegistrar.replace("Inventory.DoCreate", boost::bind(&LLInventorySingleFolderPanel::doCreate, this, _2)); } LLInventorySingleFolderPanel::~LLInventorySingleFolderPanel() @@ -2225,6 +2226,18 @@ bool LLInventorySingleFolderPanel::hasVisibleItems() { return mFolderRoot.get()->hasVisibleChildren(); } + +void LLInventorySingleFolderPanel::doCreate(const LLSD& userdata) +{ + std::string type_name = userdata.asString(); + LLUUID dest_id = LLFolderBridge::sSelf.get()->getUUID(); + if (("category" == type_name) || ("outfit" == type_name)) + { + changeFolderRoot(dest_id); + } + reset_inventory_filter(); + menu_create_inventory_item(this, dest_id, userdata); +} /************************************************************************/ /* Asset Pre-Filtered Inventory Panel related class */ /************************************************************************/ |