From ac1eed6ff3e2ef03858256da76fd8408dcc79e9a Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Sat, 20 Feb 2010 17:07:34 +0100 Subject: fix: crash on relog; appearence self pie greyed out after relog. --- linden/indra/newview/lltoolpie.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'linden/indra/newview/lltoolpie.cpp') diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp index 626831f..0241d81 100644 --- a/linden/indra/newview/lltoolpie.cpp +++ b/linden/indra/newview/lltoolpie.cpp @@ -149,6 +149,7 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) // didn't click in any UI object, so must have clicked in the world LLViewerObject *object = mPick.getObject(); LLViewerObject *parent = NULL; + bool is_self = (object == gAgent.getAvatarObject()); if (mPick.mPickType != LLPickInfo::PICK_LAND) { @@ -283,7 +284,7 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) } object = (LLViewerObject*)object->getParent(); } - if (object && object == gAgent.getAvatarObject()) + if (object && is_self) { // we left clicked on avatar, switch to focus mode LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance()); @@ -323,16 +324,16 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) effectp->setColor(LLColor4U(gAgent.getEffectColor())); effectp->setDuration(0.25f); } - else if (mPick.mObjectID == gAgent.getID() ) + else if (object && is_self) { - if(!gPieSelf) - { +// if(gPieSelf) +// { //either at very early startup stage or at late quitting stage, //this event is ignored. - return TRUE ; - } + gPieSelf->show(x, y, mPieMouseButtonDown); +// } + - gPieSelf->show(x, y, mPieMouseButtonDown); } else if (object) { -- cgit v1.1