diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llinventorygallery.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_inventory.xml | 3 |
4 files changed, 15 insertions, 9 deletions
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index 200a9b2a91..f81beefc28 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -1315,7 +1315,7 @@ void LLInventoryGallery::paste() } const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); - if (gInventory.isObjectDescendentOf(mSelectedItemID, marketplacelistings_id)) + if (!mSelectedItemID.isNull() && gInventory.isObjectDescendentOf(mSelectedItemID, marketplacelistings_id)) { return; } diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index f7a24a09c0..a53f2f85cb 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -2196,7 +2196,7 @@ LLInventorySingleFolderPanel::LLInventorySingleFolderPanel(const Params& params) getFilter().setEmptyLookupMessage("InventorySingleFolderNoMatches"); getFilter().setDefaultEmptyLookupMessage("InventorySingleFolderEmpty"); - mCommitCallbackRegistrar.add("Inventory.OpenSelectedFolder", boost::bind(&LLInventorySingleFolderPanel::openInCurrentWindow, this, _2)); + mCommitCallbackRegistrar.replace("Inventory.DoToSelected", boost::bind(&LLInventorySingleFolderPanel::doToSelected, this, _2)); mCommitCallbackRegistrar.replace("Inventory.DoCreate", boost::bind(&LLInventorySingleFolderPanel::doCreate, this, _2)); mCommitCallbackRegistrar.replace("Inventory.Share", boost::bind(&LLInventorySingleFolderPanel::doShare, this)); } @@ -2230,11 +2230,6 @@ void LLInventorySingleFolderPanel::initFolderRoot(const LLUUID& start_folder_id) mFolderRoot.get()->setSingleFolderMode(true); } -void LLInventorySingleFolderPanel::openInCurrentWindow(const LLSD& userdata) -{ - changeFolderRoot(LLFolderBridge::sSelf.get()->getUUID()); -} - void LLInventorySingleFolderPanel::changeFolderRoot(const LLUUID& new_id) { if (mFolderID != new_id) @@ -2365,6 +2360,16 @@ void LLInventorySingleFolderPanel::doCreate(const LLSD& userdata) menu_create_inventory_item(this, dest_id, userdata); } +void LLInventorySingleFolderPanel::doToSelected(const LLSD& userdata) +{ + if (("open_in_current_window" == userdata.asString())) + { + changeFolderRoot(LLFolderBridge::sSelf.get()->getUUID()); + return; + } + LLInventoryPanel::doToSelected(userdata); +} + void LLInventorySingleFolderPanel::doShare() { LLAvatarActions::shareWithAvatars(this); diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 20c9584015..341be0cf86 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -408,7 +408,6 @@ public: void initFolderRoot(const LLUUID& start_folder_id = LLUUID::null); - void openInCurrentWindow(const LLSD& userdata); void changeFolderRoot(const LLUUID& new_id); void onForwardFolder(); void onBackwardFolder(); @@ -416,6 +415,7 @@ public: LLUUID getSingleFolderRoot() { return mFolderID; } void doCreate(const LLSD& userdata); + void doToSelected(const LLSD& userdata); void doShare(); bool isBackwardAvailable(); diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 8374e63219..e650c10603 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -386,7 +386,8 @@ layout="topleft" name="open_in_current_window"> <menu_item_call.on_click - function="Inventory.OpenSelectedFolder"/> + function="Inventory.DoToSelected" + parameter="open_in_current_window" /> </menu_item_call> <menu_item_call label="Open in new window" |