diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-04-19 22:06:00 +0300 |
---|---|---|
committer | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-04-19 22:06:00 +0300 |
commit | 873fcd3a0ba50bb06f8fc74dc516da6426280856 (patch) | |
tree | 056033c7813223c5aecf30f836b819cf470c6fdb | |
parent | 1e4ebffa0c801b41990ab38c85ef95eb6f948cd5 (diff) |
SL-19621 Right click>New folder in List View should change root folder before creating new folder
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.h | 2 |
2 files changed, 15 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 */ /************************************************************************/ diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index abd5b4f20b..fb2419ada7 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -402,6 +402,8 @@ public: void clearNavigationHistory(); LLUUID getSingleFolderRoot() { return mFolderID; } + void doCreate(const LLSD& userdata); + bool isBackwardAvailable(); bool isForwardAvailable(); |