diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-05-08 21:41:56 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-05-08 21:41:56 +0300 |
commit | 3175525950ecf568eb75a6cb4f9283ee32dcd9a5 (patch) | |
tree | e7e28987b5618ffcf081a3ef0bdbb9717ccd1d6c /indra/newview/llviewermenu.cpp | |
parent | 9d2cb130e35fcbab98d5e7cb4d0d26ca6a16503b (diff) | |
parent | 34322f8f37380df868703051230f2a4109602b3f (diff) |
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1ed02a9a61..079a25cfae 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7105,25 +7105,19 @@ BOOL object_selected_and_point_valid() BOOL object_is_wearable() { - if (!object_selected_and_point_valid()) + if (!isAgentAvatarValid()) { return FALSE; } - if (sitting_on_selection()) + if (!object_selected_and_point_valid()) { return FALSE; } - LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); - for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin(); - iter != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); iter++) + if (sitting_on_selection()) { - LLSelectNode* node = *iter; - if (node->mPermissions->getOwner() == gAgent.getID()) - { - return TRUE; - } + return FALSE; } - return FALSE; + return gAgentAvatarp->canAttachMoreObjects(); } @@ -9246,7 +9240,7 @@ void initialize_menus() enable.add("Object.EnableOpen", boost::bind(&enable_object_open)); enable.add("Object.EnableTouch", boost::bind(&enable_object_touch, _1)); enable.add("Object.EnableDelete", boost::bind(&enable_object_delete)); - enable.add("Object.EnableWear", boost::bind(&object_selected_and_point_valid)); + enable.add("Object.EnableWear", boost::bind(&object_is_wearable)); enable.add("Object.EnableStandUp", boost::bind(&enable_object_stand_up)); enable.add("Object.EnableSit", boost::bind(&enable_object_sit, _1)); |