summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-12-09 13:06:07 -0800
committerJames Cook <james@lindenlab.com>2009-12-09 13:06:07 -0800
commit3476116de84f43367b26e95535ea00ce77ee5215 (patch)
treedff6eb5b61f5e6d2fdb77863fdb801c1043a5653 /indra/newview/llviewermenu.cpp
parente9bca5d52ab69f25568b344081e9ae0b699a0ade (diff)
EXT-2827 and fix for delete key not deleting objects while building.
Object inventory was grabbing edit menu handling during refresh. Put back Angela's code so that Right-click > Remove > Delete is now disabled if you have a single face selected. Fixed LLSelectMgr::contains() for SELECT_ALL_TES case. Reviewed with Richard.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp32
1 files changed, 18 insertions, 14 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 431b4d3c0a..9d81f7edb0 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2698,20 +2698,24 @@ BOOL enable_has_attachments(void*)
bool enable_object_mute()
{
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
- bool new_value = (object != NULL);
- if (new_value)
- {
- LLVOAvatar* avatar = find_avatar_from_object(object);
- if (avatar)
- {
- // It's an avatar
- LLNameValue *lastname = avatar->getNVPair("LastName");
- BOOL is_linden = lastname && !LLStringUtil::compareStrings(lastname->getString(), "Linden");
- BOOL is_self = avatar->isSelf();
- new_value = !is_linden && !is_self;
- }
- }
- return new_value;
+ if (!object) return false;
+
+ LLVOAvatar* avatar = find_avatar_from_object(object);
+ if (avatar)
+ {
+ // It's an avatar
+ LLNameValue *lastname = avatar->getNVPair("LastName");
+ bool is_linden =
+ lastname && !LLStringUtil::compareStrings(lastname->getString(), "Linden");
+ bool is_self = avatar->isSelf();
+ return !is_linden && !is_self;
+ }
+ else
+ {
+ // Just a regular object
+ return LLSelectMgr::getInstance()->getSelection()->
+ contains( object, SELECT_ALL_TES );
+ }
}
class LLObjectMute : public view_listener_t