summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-10-06 21:50:48 +0000
committerJames Cook <james@lindenlab.com>2009-10-06 21:50:48 +0000
commit480782015565d29cebf4bffe1992462fc7cb8920 (patch)
tree0fbc0e0d5e89969c50348082faa99fcbdfc4b53a
parent29ca0f064d56d957839aa05d94786b0c2d5ad5e5 (diff)
EXT-1144 Unable to pay objects. LLFloaterPay was not taking object selection handle properly. Made LLFloaterPay::payViaObject() take a selection handle as a parameter, got rid of mTargetIsObject and cleaned up selection handle on close. Reviewed with Leyla.
-rw-r--r--indra/newview/llselectmgr.h2
-rw-r--r--indra/newview/llviewermenu.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 26ac95060f..c60d37a999 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -273,6 +273,8 @@ public:
LLViewerObject* getFirstCopyableObject(BOOL get_parent = FALSE);
LLViewerObject* getFirstDeleteableObject();
LLViewerObject* getFirstMoveableObject(BOOL get_parent = FALSE);
+
+ /// Return the object that lead to this selection, possible a child
LLViewerObject* getPrimaryObject() { return mPrimaryObject; }
// iterate through texture entries
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 3ecae2829d..4c6abd7edb 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5414,7 +5414,7 @@ class LLAvatarAddContact : public view_listener_t
}
};
-bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle handle)
+bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection)
{
S32 option = LLNotification::getSelectedOption(notification, response);
if (option == 0)
@@ -5422,7 +5422,7 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec
gAgent.clearBusy();
}
- LLViewerObject* objectp = handle->getPrimaryObject();
+ LLViewerObject* objectp = selection->getPrimaryObject();
// Show avatar's name if paying attachment
if (objectp && objectp->isAttachment())
@@ -5444,7 +5444,7 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec
}
else
{
- LLFloaterPay::payViaObject(&give_money, objectp->getID());
+ LLFloaterPay::payViaObject(&give_money, selection);
}
}
return false;