From e4b446217c8154fa83815308b98c8278f43e652e Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Wed, 31 Jul 2013 21:52:01 +0200 Subject: [PATCH] Enable export menus if anything is exportable --- indra/newview/llviewermenu.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 12562379f..02c9e42dd 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2890,17 +2890,17 @@ class LLObjectEnableExport : public view_listener_t bool supports_export = LFSimFeatureHandler::instance().simSupportsExport(); if (new_value && !(supports_export && (perms.getMaskEveryone() & PERM_EXPORT))) // No need to call allowExportBy if PERM_EXPORT is set on (all) root objects. { - struct ff : public LLSelectedNodeFunctor + bool can_export_any = false; + LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); + for (LLObjectSelection::iterator node = selection->begin(); node != selection->end(); ++node) { - bool mSupportsExport; - ff(bool supports_export) : mSupportsExport(supports_export) { } - virtual bool apply(LLSelectNode* node) + if ((*node)->mPermissions->allowExportBy(gAgent.getID(), supports_export)) { - return node->mPermissions->allowExportBy(gAgent.getID(), mSupportsExport); + can_export_any = true; + break; } - }; - ff the_ff(supports_export); - new_value = LLSelectMgr::getInstance()->getSelection()->applyToNodes(&the_ff, false); + } + new_value = can_export_any; } gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); return true;