diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-11-02 19:35:31 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-11-02 19:35:31 +0200 |
commit | 73303d918465090b8e2a39514f4d9db49d0ff109 (patch) | |
tree | 3b45e4170d3b3c8180c01a2bd76bcb6739485d3c /indra/newview/llinventorybridge.cpp | |
parent | d83f2e56dab87e2448399a02a97fb07e243ea5e6 (diff) |
SL-14075 Allow bulk download of textures/pictures
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 539d80532c..8fbc3c52ab 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5469,11 +5469,20 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) getClipboardEntries(true, items, disabled_items, flags); items.push_back(std::string("Texture Separator")); - items.push_back(std::string("Save As")); - if (!canSaveTexture()) - { - disabled_items.push_back(std::string("Save As")); - } + + if ((flags & ITEM_IN_MULTI_SELECTION) != 0) + { + items.push_back(std::string("Save Selected As")); + } + else + { + items.push_back(std::string("Save As")); + if (!canSaveTexture()) + { + disabled_items.push_back(std::string("Save As")); + } + } + } addLinkReplaceMenuOption(items, disabled_items); hide_context_entries(menu, items, disabled_items); @@ -5491,6 +5500,23 @@ void LLTextureBridge::performAction(LLInventoryModel* model, std::string action) preview_texture->saveAs(); } } + else if ("save_selected_as" == action) + { + openItem(); + if (canSaveTexture()) + { + LLPreviewTexture* preview_texture = LLFloaterReg::getTypedInstance<LLPreviewTexture>("preview_texture", mUUID); + if (preview_texture) + { + preview_texture->saveMultipleToFile(); + } + } + else + { + LL_WARNS() << "You don't have permission to save " << getName() << " to disk." << LL_ENDL; + } + + } else LLItemBridge::performAction(model, action); } |