summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpie.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2007-02-27 01:03:39 +0000
committerSteven Bennetts <steve@lindenlab.com>2007-02-27 01:03:39 +0000
commit647d29b1a2d4712ea738b408be43e56895a715b1 (patch)
tree8db33983be6e10c05895f9774bfbad81a3f6ae81 /indra/newview/lltoolpie.cpp
parentc4b5b3977ffa6669a00f9bc334db02f51cc10fcb (diff)
merge -r 58285:58437 maintenance.
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r--indra/newview/lltoolpie.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 68834fe564..e0b4483224 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -43,6 +43,7 @@
LLToolPie *gToolPie = NULL;
LLViewerObject* LLToolPie::sClickActionObject = NULL;
+LLHandle<LLObjectSelection> LLToolPie::sLeftClickSelection = NULL;
extern void handle_buy(void*);
@@ -169,19 +170,19 @@ BOOL LLToolPie::pickAndShowMenu(S32 x, S32 y, MASK mask, BOOL always_show)
|| parent && parent->flagTakesMoney())
{
sClickActionObject = parent;
- LLToolSelect::handleObjectSelection(parent, MASK_NONE, FALSE, TRUE);
+ sLeftClickSelection = LLToolSelect::handleObjectSelection(parent, MASK_NONE, FALSE, TRUE);
return TRUE;
}
break;
case CLICK_ACTION_BUY:
sClickActionObject = parent;
- LLToolSelect::handleObjectSelection(parent, MASK_NONE, FALSE, TRUE);
+ sLeftClickSelection = LLToolSelect::handleObjectSelection(parent, MASK_NONE, FALSE, TRUE);
return TRUE;
case CLICK_ACTION_OPEN:
if (parent && parent->allowOpen())
{
sClickActionObject = parent;
- LLToolSelect::handleObjectSelection(parent, MASK_NONE, FALSE, TRUE);
+ sLeftClickSelection = LLToolSelect::handleObjectSelection(parent, MASK_NONE, FALSE, TRUE);
}
return TRUE;
}
@@ -396,10 +397,11 @@ void LLToolPie::selectionPropertiesReceived()
return;
}
- if (sClickActionObject
- && !sClickActionObject->isDead())
+ if (!sLeftClickSelection->isEmpty())
{
- LLViewerObject* root = gSelectMgr->getSelection()->getFirstRootObject();
+ LLViewerObject* root = sLeftClickSelection->getFirstRootObject();
+ // since we don't currently have a way to lock a selection, it could have changed
+ // after we initially clicked on the object
if (root == sClickActionObject)
{
U8 action = root->getClickAction();
@@ -419,6 +421,7 @@ void LLToolPie::selectionPropertiesReceived()
}
}
}
+ sLeftClickSelection = NULL;
sClickActionObject = NULL;
}