summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolbar.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2008-04-30 23:30:09 +0000
committerJames Cook <james@lindenlab.com>2008-04-30 23:30:09 +0000
commit36fccc3888c5dc318a8a235da8a5cae4faeb637d (patch)
tree021e439fe9fa3a285062d70bf0b8c0f799471681 /indra/newview/lltoolbar.cpp
parentcf2a96375f62316b98c2dddd57f812f7565584be (diff)
svn merge -r 86190:86191 maint-ui-11-merge (EFFECTIVE MERGE: -r 84579:85724 maint-ui-11-qa).
Diffstat (limited to 'indra/newview/lltoolbar.cpp')
-rw-r--r--indra/newview/lltoolbar.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp
index 606bc75103..1ab1b15108 100644
--- a/indra/newview/lltoolbar.cpp
+++ b/indra/newview/lltoolbar.cpp
@@ -288,10 +288,15 @@ void LLToolBar::refresh()
// Clothing button updated inside LLFloaterClothing
- childSetEnabled("fly_btn", gAgent.canFly() || gAgent.getFlying() );
+ BOOL sitting = FALSE;
+ if (gAgent.getAvatarObject())
+ {
+ sitting = gAgent.getAvatarObject()->mIsSitting;
+ }
- childSetEnabled("build_btn", LLViewerParcelMgr::getInstance()->agentCanBuild() );
+ childSetEnabled("fly_btn", (gAgent.canFly() || gAgent.getFlying()) && !sitting );
+ childSetEnabled("build_btn", LLViewerParcelMgr::getInstance()->agentCanBuild() );
// Check to see if we're in build mode
BOOL build_mode = LLToolMgr::getInstance()->inEdit();