diff options
author | Euclid Linden <euclid@lindenlab.com> | 2021-11-16 18:16:24 +0000 |
---|---|---|
committer | Euclid Linden <euclid@lindenlab.com> | 2021-11-16 18:16:24 +0000 |
commit | b1964a47005d7bbd99258af7f4eaf4b12baeb423 (patch) | |
tree | 8e27a7cb161f6e24439a772c5bcfdd4a3ee6f83a /indra/newview/llinventorybridge.cpp | |
parent | e914f3e4a11ff86b3e05089c9b3a6677ec623c9c (diff) | |
parent | 17f71efce08ed4e677b497f4734d6f9f1fef56a3 (diff) |
Merged in DV528-merge-6.5.1 (pull request #774)
DRTVWR-528 merge up to 6.5.1
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index fc8179f3b4..81b55c1073 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5465,11 +5465,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); @@ -5487,6 +5496,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(mFileName); + } + } + else + { + LL_WARNS() << "You don't have permission to save " << getName() << " to disk." << LL_ENDL; + } + + } else LLItemBridge::performAction(model, action); } @@ -6816,7 +6842,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) disabled_items.push_back(std::string("Wearable Edit")); } - if (LLWearableType::getAllowMultiwear(mWearableType)) + if (LLWearableType::getInstance()->getAllowMultiwear(mWearableType)) { items.push_back(std::string("Wearable Add")); if (!gAgentWearables.canAddWearable(mWearableType)) |