From fcda925072c51de749e6b35b3863f29d8be3eaa6 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 29 Mar 2012 18:07:40 -0700 Subject: PATH-450: BUGFIX Ensuring that permanent objects cannot be linked in frozen mode. Displaying a modal notification if user attempts. --- indra/newview/llsidepaneltaskinfo.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview/llsidepaneltaskinfo.cpp') diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 24cb559fd0..4b49ae9f43 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -301,6 +301,8 @@ void LLSidepanelTaskInfo::refresh() // BUG: fails if a root and non-root are both single-selected. const BOOL is_perm_modify = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) || LLSelectMgr::getInstance()->selectGetModify(); + const BOOL is_nonpermanent = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanent()) || + LLSelectMgr::getInstance()->selectGetNonPermanent(); S32 string_index = 0; std::string MODIFY_INFO_STRINGS[] = @@ -308,12 +310,18 @@ void LLSidepanelTaskInfo::refresh() getString("text modify info 1"), getString("text modify info 2"), getString("text modify info 3"), - getString("text modify info 4") + getString("text modify info 4"), + getString("text modify info 5"), + getString("text modify info 6") }; if (!is_perm_modify) { string_index += 2; } + else if (!is_nonpermanent) + { + string_index += 4; + } if (!is_one_object) { ++string_index; -- cgit v1.2.3 From 379aff3520d368d1119e00f46684670030472832 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 13 Jun 2012 16:57:35 -0700 Subject: PATH-713: Disabling all editable object fields on the build tools floater when a static pathfinding object is in not in the current region. --- indra/newview/llsidepaneltaskinfo.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llsidepaneltaskinfo.cpp') diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 4b49ae9f43..4b84bbb265 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -393,7 +393,7 @@ void LLSidepanelTaskInfo::refresh() } } - getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID())); + getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent); getChildView("Name:")->setEnabled(TRUE); LLLineEditor* LineEditorObjectName = getChild("Object Name"); @@ -423,7 +423,7 @@ void LLSidepanelTaskInfo::refresh() // figure out the contents of the name, description, & category BOOL edit_name_desc = FALSE; - if (is_one_object && objectp->permModify()) + if (is_one_object && objectp->permModify() && !objectp->isPermanentEnforced()) { edit_name_desc = TRUE; } @@ -603,12 +603,12 @@ void LLSidepanelTaskInfo::refresh() BOOL has_change_perm_ability = FALSE; BOOL has_change_sale_ability = FALSE; - if (valid_base_perms && + if (valid_base_perms && is_nonpermanent && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE)))) { has_change_perm_ability = TRUE; } - if (valid_base_perms && + if (valid_base_perms && is_nonpermanent && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE)))) { has_change_sale_ability = TRUE; @@ -820,8 +820,8 @@ void LLSidepanelTaskInfo::refresh() ComboClickAction->setCurrentByIndex((S32)click_action); } } - getChildView("label click action")->setEnabled(is_perm_modify && all_volume); - getChildView("clickaction")->setEnabled(is_perm_modify && all_volume); + getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent && all_volume); + getChildView("clickaction")->setEnabled(is_perm_modify && is_nonpermanent && all_volume); if (!getIsEditing()) { -- cgit v1.2.3 From aea6b0c70ccb1a330c1ee2a0f66c3fa72d2700ca Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 21 Jun 2012 17:29:12 -0700 Subject: PATH-760: Renaming some methods of LLSelectMgr. --- indra/newview/llsidepaneltaskinfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llsidepaneltaskinfo.cpp') diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 4b84bbb265..8a1fa20a4e 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -301,8 +301,8 @@ void LLSidepanelTaskInfo::refresh() // BUG: fails if a root and non-root are both single-selected. const BOOL is_perm_modify = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) || LLSelectMgr::getInstance()->selectGetModify(); - const BOOL is_nonpermanent = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanent()) || - LLSelectMgr::getInstance()->selectGetNonPermanent(); + const BOOL is_nonpermanent = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) || + LLSelectMgr::getInstance()->selectGetNonPermanentEnforced(); S32 string_index = 0; std::string MODIFY_INFO_STRINGS[] = -- cgit v1.2.3 From f143da27bf09b0e7a9b73de80609b2326a7e672e Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 21 Jun 2012 18:03:23 -0700 Subject: PATH-760: Ensuring that the pathfinding attribute field works correctly with multiple objects selected. --- indra/newview/llsidepaneltaskinfo.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llsidepaneltaskinfo.cpp') diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 8a1fa20a4e..d470554548 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -301,7 +301,7 @@ void LLSidepanelTaskInfo::refresh() // BUG: fails if a root and non-root are both single-selected. const BOOL is_perm_modify = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) || LLSelectMgr::getInstance()->selectGetModify(); - const BOOL is_nonpermanent = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) || + const BOOL is_nonpermanent_enforced = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) || LLSelectMgr::getInstance()->selectGetNonPermanentEnforced(); S32 string_index = 0; @@ -318,7 +318,7 @@ void LLSidepanelTaskInfo::refresh() { string_index += 2; } - else if (!is_nonpermanent) + else if (!is_nonpermanent_enforced) { string_index += 4; } @@ -393,7 +393,7 @@ void LLSidepanelTaskInfo::refresh() } } - getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent); + getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced); getChildView("Name:")->setEnabled(TRUE); LLLineEditor* LineEditorObjectName = getChild("Object Name"); @@ -603,12 +603,12 @@ void LLSidepanelTaskInfo::refresh() BOOL has_change_perm_ability = FALSE; BOOL has_change_sale_ability = FALSE; - if (valid_base_perms && is_nonpermanent && + if (valid_base_perms && is_nonpermanent_enforced && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE)))) { has_change_perm_ability = TRUE; } - if (valid_base_perms && is_nonpermanent && + if (valid_base_perms && is_nonpermanent_enforced && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE)))) { has_change_sale_ability = TRUE; @@ -820,8 +820,8 @@ void LLSidepanelTaskInfo::refresh() ComboClickAction->setCurrentByIndex((S32)click_action); } } - getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent && all_volume); - getChildView("clickaction")->setEnabled(is_perm_modify && is_nonpermanent && all_volume); + getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume); + getChildView("clickaction")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume); if (!getIsEditing()) { -- cgit v1.2.3 From bec4708fbab662651a7ebc28a3900b8a5e90c28b Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 5 Jul 2012 17:54:04 -0700 Subject: Adding the pathfinding attributes to the object profile panel. --- indra/newview/llsidepaneltaskinfo.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'indra/newview/llsidepaneltaskinfo.cpp') diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 62d6016476..c351b1a128 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -61,6 +61,9 @@ #include "llspinctrl.h" #include "roles_constants.h" #include "llgroupactions.h" +#include "lltextbase.h" +#include "llstring.h" +#include "lltrans.h" ///---------------------------------------------------------------------------- /// Class llsidepaneltaskinfo @@ -146,6 +149,7 @@ BOOL LLSidepanelTaskInfo::postBuild() mDAEditCost = getChild("Edit Cost"); mDALabelClickAction = getChildView("label click action"); mDAComboClickAction = getChild("clickaction"); + mDAPathfindingAttributes = getChild("pathfinding_attributes_value"); mDAB = getChildView("B:"); mDAO = getChildView("O:"); mDAG = getChildView("G:"); @@ -242,6 +246,9 @@ void LLSidepanelTaskInfo::disableAll() mDAComboClickAction->clear(); } + mDAPathfindingAttributes->setEnabled(FALSE); + mDAPathfindingAttributes->setValue(LLStringUtil::null); + mDAB->setVisible(FALSE); mDAO->setVisible(FALSE); mDAG->setVisible(FALSE); @@ -329,6 +336,34 @@ void LLSidepanelTaskInfo::refresh() getChildView("perm_modify")->setEnabled(TRUE); getChild("perm_modify")->setValue(MODIFY_INFO_STRINGS[string_index]); + std::string pfAttrName; + + if ((mObjectSelection->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsNonPathfinding()) + || LLSelectMgr::getInstance()->selectGetNonPathfinding()) + { + pfAttrName = "Pathfinding_Object_Attr_None"; + } + else if ((mObjectSelection->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsPermanent()) + || LLSelectMgr::getInstance()->selectGetPermanent()) + { + pfAttrName = "Pathfinding_Object_Attr_Permanent"; + } + else if ((mObjectSelection->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsCharacter()) + || LLSelectMgr::getInstance()->selectGetCharacter()) + { + pfAttrName = "Pathfinding_Object_Attr_Character"; + } + else + { + pfAttrName = "Pathfinding_Object_Attr_MultiSelect"; + } + + mDAPathfindingAttributes->setEnabled(TRUE); + mDAPathfindingAttributes->setValue(LLTrans::getString(pfAttrName)); + getChildView("Permissions:")->setEnabled(TRUE); // Update creator text field -- cgit v1.2.3