diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-09 18:10:36 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-09 18:10:36 +0300 |
commit | 953e0a619abba8d85faf8bf3e59d59e344bfc566 (patch) | |
tree | efdadf33a852f247e074e1ea847b74dd3952139d /indra/newview/llvoavatar.cpp | |
parent | b5df08724acf103be44436db8cc5689275ba60d0 (diff) |
EXT-8577 FIXED Context menu items for multi-attachments
Changes:
* Implemented bulk-add from My Appearance SP.
* Made sure there's no memleak when you click Wear/Attach in the in-world object context menu
and the callback isn't invoked (because e.g. avatar fails to get close enough to the object).
I stated that in comments.
Reviewed by Seraph at https://codereview.productengine.com/secondlife/r/844/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 298ac28ca8..6392aad248 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5642,6 +5642,15 @@ BOOL LLVOAvatar::canAttachMoreObjects() const } //----------------------------------------------------------------------------- +// canAttachMoreObjects() +// Returns true if we can attach <n> more objects. +//----------------------------------------------------------------------------- +BOOL LLVOAvatar::canAttachMoreObjects(U32 n) const +{ + return (getNumAttachments() + n) <= MAX_AGENT_ATTACHMENTS; +} + +//----------------------------------------------------------------------------- // lazyAttach() //----------------------------------------------------------------------------- void LLVOAvatar::lazyAttach() |