summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolbar.cpp
diff options
context:
space:
mode:
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();