summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 6a6aa1061d..c67af994a4 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2733,15 +2733,26 @@ bool enable_object_edit()
// there. Eventually this needs to be replaced with code that only
// lets you edit objects if you have permission to do so (edit perms,
// group edit, god). See also lltoolbar.cpp. JC
- bool enable = true;
+ bool enable = false;
if (gAgent.inPrelude())
{
enable = LLViewerParcelMgr::getInstance()->agentCanBuild()
|| LLSelectMgr::getInstance()->getSelection()->isAttachment();
+ }
+ else if (LLSelectMgr::getInstance()->selectGetModify())
+ {
+ enable = true;
}
+
return enable;
}
+// mutually exclusive - show either edit option or build in menu
+bool enable_object_build()
+{
+ return !enable_object_edit();
+}
+
class LLSelfRemoveAllAttachments : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -8023,6 +8034,8 @@ void initialize_menus()
visible.add("VisiblePayObject", boost::bind(&enable_pay_object));
enable.add("EnablePayAvatar", boost::bind(&enable_pay_avatar));
enable.add("EnableEdit", boost::bind(&enable_object_edit));
+ visible.add("VisibleBuild", boost::bind(&enable_object_build));
+ visible.add("VisibleEdit", boost::bind(&enable_object_edit));
visible.add("Object.VisibleEdit", boost::bind(&enable_object_edit));
view_listener_t::addMenu(new LLFloaterVisible(), "FloaterVisible");