summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorygallerymenu.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index 541fed8172..bca10b9c0e 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -42,6 +42,7 @@
#include "llmarketplacefunctions.h"
#include "llmenugl.h"
#include "llnotificationsutil.h"
+#include "llpreviewtexture.h"
#include "lltrans.h"
#include "llviewerfoldertype.h"
#include "llviewerwindow.h"
@@ -269,6 +270,15 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata, const LLU
show_on_map_cb(landmark);
}
}
+ else if ("save_as" == action)
+ {
+ LLPreviewTexture* preview_texture = LLFloaterReg::getTypedInstance<LLPreviewTexture>("preview_texture", selected_id);
+ if (preview_texture)
+ {
+ preview_texture->openToSave();
+ preview_texture->saveAs();
+ }
+ }
}
void LLInventoryGalleryContextMenu::onRename(const LLSD& notification, const LLSD& response)
@@ -620,6 +630,15 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
}
}
}
+ if(obj->getType() == LLAssetType::AT_TEXTURE)
+ {
+ items.push_back(std::string("Save As"));
+ bool can_copy = selected_item && selected_item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED);
+ if (!can_copy)
+ {
+ disabled_items.push_back(std::string("Save As"));
+ }
+ }
if (is_link)
{
items.push_back(std::string("Find Original"));