diff options
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rwxr-xr-x | indra/newview/llviewermenu.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index be9b4439a8..b77d3ca1be 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2580,9 +2580,13 @@ static LLStringExplicit get_default_item_label(const std::string& item_name) bool enable_object_touch(LLUICtrl* ctrl) { + bool new_value = false; LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); - - bool new_value = obj && obj->flagHandleTouch(); + if (obj) + { + LLViewerObject* parent = (LLViewerObject*)obj->getParent(); + new_value = obj->flagHandleTouch() || (parent && parent->flagHandleTouch()); + } std::string item_name = ctrl->getName(); init_default_item_label(item_name); @@ -2867,6 +2871,11 @@ bool enable_object_select_in_pathfinding_linksets() return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetEditableLinksets(); } +bool visible_object_select_in_pathfinding_linksets() +{ + return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion(); +} + bool enable_object_select_in_pathfinding_characters() { return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetViewableCharacters(); @@ -4354,7 +4363,10 @@ static bool get_derezzable_objects( break; case DRD_RETURN_TO_OWNER: - can_derez_current = TRUE; + if(!object->isAttachment()) + { + can_derez_current = TRUE; + } break; default: @@ -4762,7 +4774,7 @@ BOOL enable_take() && object->permModify()) || (node->mPermissions->getOwner() == gAgent.getID()))) { - return TRUE; + return !object->isAttachment(); } #endif } @@ -8281,6 +8293,10 @@ class LLWorldEnableEnvSettings : public view_listener_t { result = (LLEnvManagerNew::instance().getSkyPresetName() == "Midnight"); } + else if (tod == "region") + { + return false; + } else { LL_WARNS() << "Unknown time-of-day item: " << tod << LL_ENDL; @@ -8979,6 +8995,7 @@ void initialize_menus() enable.add("VisibleBuild", boost::bind(&enable_object_build)); commit.add("Pathfinding.Linksets.Select", boost::bind(&LLFloaterPathfindingLinksets::openLinksetsWithSelectedObjects)); enable.add("EnableSelectInPathfindingLinksets", boost::bind(&enable_object_select_in_pathfinding_linksets)); + enable.add("VisibleSelectInPathfindingLinksets", boost::bind(&visible_object_select_in_pathfinding_linksets)); commit.add("Pathfinding.Characters.Select", boost::bind(&LLFloaterPathfindingCharacters::openCharactersWithSelectedObjects)); enable.add("EnableSelectInPathfindingCharacters", boost::bind(&enable_object_select_in_pathfinding_characters)); |