From 2a4dea528f670b9bb1f77ef27a8a1dd16603d114 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:50 -0500 Subject: Second Life viewer sources 1.20.7 --- linden/indra/newview/lltoolbar.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'linden/indra/newview/lltoolbar.cpp') diff --git a/linden/indra/newview/lltoolbar.cpp b/linden/indra/newview/lltoolbar.cpp index 8d103ce..6612538 100644 --- a/linden/indra/newview/lltoolbar.cpp +++ b/linden/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(); -- cgit v1.1