summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-08-28 23:57:41 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-08-28 23:57:41 +0000
commit4a6bacea0f8dcff959028f285bc533852da608b5 (patch)
tree7f49b429051e550f70917ccbcdd1c27bf86f5bdf /indra/newview/llviewermenu.cpp
parentac4766d4354ee1945f1569a94d755e3e7c0cd566 (diff)
merge viewer/viewer_1-21 94170-94770 -> release
merge viewer/viewer_1-21-0 94830-95157 -> release Includes: QAR-786 Sandbox buildme for viewer + server Release Notes on the wiki! QAR-797 teleport failures (DEV-6198 / SVC-972) mergeme
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index af16bdd201..2f8f5a29c5 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -702,7 +702,7 @@ void init_menus()
gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT));
gMenuBarView->setBackgroundColor( color );
- gMenuBarView->setItemVisible("Tools", FALSE);
+ // gMenuBarView->setItemVisible("Tools", FALSE);
gMenuBarView->arrange();
gMenuHolder->addChild(gMenuBarView);
@@ -2055,8 +2055,18 @@ class LLEnableEdit : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
- bool new_value = gAgent.isGodlike() || !gAgent.inPrelude();
- gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
+ // *HACK: The new "prelude" Help Islands have a build sandbox area,
+ // so users need the Edit and Create pie menu options when they are
+ // 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;
+ if (gAgent.inPrelude())
+ {
+ enable = LLViewerParcelMgr::getInstance()->agentCanBuild()
+ || LLSelectMgr::getInstance()->getSelection()->isAttachment();
+ }
+ gMenuHolder->findControl(userdata["control"].asString())->setValue(enable);
return true;
}
};
@@ -4480,13 +4490,12 @@ class LLToolsStopAllAnimations : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
- LLVOAvatar* avatarp = gAgent.getAvatarObject();
-
- if (!avatarp) return true;
-
- avatarp->deactivateAllMotions();
-
- avatarp->processAnimationStateChanges();
+ LLVOAvatar* avatarp = gAgent.getAvatarObject();
+ if (avatarp)
+ {
+ avatarp->deactivateAllMotions();
+ avatarp->startDefaultMotions();
+ }
return true;
}
};