summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinventorybridge.h2
-rw-r--r--indra/newview/llinventoryfunctions.cpp25
2 files changed, 24 insertions, 3 deletions
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 6a04f08cf8..77d0fa4b04 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -109,6 +109,7 @@ public:
virtual void closeItem() {}
virtual void showProperties();
virtual BOOL isItemRenameable() const { return TRUE; }
+ virtual BOOL isMultiPreviewAllowed() { return TRUE; }
//virtual BOOL renameItem(const std::string& new_name) {}
virtual BOOL isItemRemovable() const;
virtual BOOL isItemMovable() const;
@@ -621,6 +622,7 @@ public:
virtual LLUIImagePtr getIcon() const;
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void openItem();
+ virtual BOOL isMultiPreviewAllowed() { return FALSE; }
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
virtual BOOL renameItem(const std::string& new_name);
virtual LLSettingsType::type_e getSettingsType() const { return mSettingsType; }
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 030c967019..b0004c5e58 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -2395,10 +2395,29 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
if (("task_open" == action || "open" == action) && selected_items.size() > 1)
{
- multi_previewp = new LLMultiPreview();
- gFloaterView->addChild(multi_previewp);
+ bool open_multi_preview = true;
- LLFloater::setFloaterHost(multi_previewp);
+ for (std::set<LLFolderViewItem*>::iterator set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter)
+ {
+ LLFolderViewItem* folder_item = *set_iter;
+ if (folder_item)
+ {
+ LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getViewModelItem();
+ if (!bridge || !bridge->isMultiPreviewAllowed())
+ {
+ open_multi_preview = false;
+ break;
+ }
+ }
+ }
+
+ if (open_multi_preview)
+ {
+ multi_previewp = new LLMultiPreview();
+ gFloaterView->addChild(multi_previewp);
+
+ LLFloater::setFloaterHost(multi_previewp);
+ }
}
else if (("task_properties" == action || "properties" == action) && selected_items.size() > 1)