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/llpanelpermissions.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpanelpermissions.cpp') diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 59130236f2..f3a16dbbf1 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -299,6 +299,9 @@ void LLPanelPermissions::refresh() BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) || LLSelectMgr::getInstance()->selectGetModify(); + BOOL is_nonpermanent = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsNonPermanent()) + || LLSelectMgr::getInstance()->selectGetNonPermanent(); const LLFocusableElement* keyboard_focus_view = gFocusMgr.getKeyboardFocus(); S32 string_index = 0; @@ -307,12 +310,18 @@ void LLPanelPermissions::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/llpanelpermissions.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llpanelpermissions.cpp') diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index f3a16dbbf1..64481717f5 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -393,7 +393,7 @@ void LLPanelPermissions::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 LLPanelPermissions::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 LLPanelPermissions::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; @@ -821,8 +821,8 @@ void LLPanelPermissions::refresh() combo_click_action->setValue(LLSD(combo_value)); } } - 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); } -- cgit v1.2.3 From f87034c3c2b9e11dee678dc3ff3458d2485c1710 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 20 Jun 2012 18:07:04 -0700 Subject: PATH-760: First pass at Leo's new design for the build floater. --- indra/newview/llpanelpermissions.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'indra/newview/llpanelpermissions.cpp') diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 64481717f5..262dadf907 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -62,6 +62,7 @@ #include "llspinctrl.h" #include "roles_constants.h" #include "llgroupactions.h" +#include "lltrans.h" U8 string_value_to_click_action(std::string p_value); @@ -180,6 +181,9 @@ void LLPanelPermissions::disableAll() getChildView("perm_modify")->setEnabled(FALSE); getChild("perm_modify")->setValue(LLStringUtil::null); + getChildView("pathfinding_attributes_value")->setEnabled(FALSE); + getChild("pathfinding_attributes_value")->setValue(LLStringUtil::null); + getChildView("Creator:")->setEnabled(FALSE); getChild("Creator Name")->setValue(LLStringUtil::null); getChildView("Creator Name")->setEnabled(FALSE); @@ -329,6 +333,29 @@ void LLPanelPermissions::refresh() getChildView("perm_modify")->setEnabled(TRUE); getChild("perm_modify")->setValue(MODIFY_INFO_STRINGS[string_index]); + getChildView("pathfinding_attributes_value")->setEnabled(TRUE); + std::string pfAttrName; + if (is_one_object) + { + if (objectp->flagObjectPermanent()) + { + pfAttrName = "Pathfinding_Object_Attr_Permanent"; + } + else if (objectp->flagCharacter()) + { + pfAttrName = "Pathfinding_Object_Attr_Character"; + } + else + { + pfAttrName = "Pathfinding_Object_Attr_None"; + } + } + else + { + pfAttrName = "Pathfinding_Object_Attr_MultiSelect"; + } + getChild("pathfinding_attributes_value")->setValue(LLTrans::getString(pfAttrName)); + getChildView("Permissions:")->setEnabled(TRUE); // Update creator text field -- 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/llpanelpermissions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelpermissions.cpp') diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 262dadf907..3890bddfa5 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -304,8 +304,8 @@ void LLPanelPermissions::refresh() && LLSelectMgr::getInstance()->selectGetRootsModify()) || LLSelectMgr::getInstance()->selectGetModify(); BOOL is_nonpermanent = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() - && LLSelectMgr::getInstance()->selectGetRootsNonPermanent()) - || LLSelectMgr::getInstance()->selectGetNonPermanent(); + && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) + || LLSelectMgr::getInstance()->selectGetNonPermanentEnforced(); const LLFocusableElement* keyboard_focus_view = gFocusMgr.getKeyboardFocus(); S32 string_index = 0; -- 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/llpanelpermissions.cpp | 50 +++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 21 deletions(-) (limited to 'indra/newview/llpanelpermissions.cpp') diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 3890bddfa5..6076cb01fb 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -303,7 +303,7 @@ void LLPanelPermissions::refresh() BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) || LLSelectMgr::getInstance()->selectGetModify(); - BOOL is_nonpermanent = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + BOOL is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) || LLSelectMgr::getInstance()->selectGetNonPermanentEnforced(); const LLFocusableElement* keyboard_focus_view = gFocusMgr.getKeyboardFocus(); @@ -322,7 +322,7 @@ void LLPanelPermissions::refresh() { string_index += 2; } - else if (!is_nonpermanent) + else if (!is_nonpermanent_enforced) { string_index += 4; } @@ -333,27 +333,35 @@ void LLPanelPermissions::refresh() getChildView("perm_modify")->setEnabled(TRUE); getChild("perm_modify")->setValue(MODIFY_INFO_STRINGS[string_index]); - getChildView("pathfinding_attributes_value")->setEnabled(TRUE); std::string pfAttrName; - if (is_one_object) + + if ((LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsPermanent()) + || LLSelectMgr::getInstance()->selectGetPermanent()) { - if (objectp->flagObjectPermanent()) - { - pfAttrName = "Pathfinding_Object_Attr_Permanent"; - } - else if (objectp->flagCharacter()) - { - pfAttrName = "Pathfinding_Object_Attr_Character"; - } - else - { - pfAttrName = "Pathfinding_Object_Attr_None"; - } + pfAttrName = "Pathfinding_Object_Attr_Permanent"; + } + else if ((LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsCharacter()) + || LLSelectMgr::getInstance()->selectGetCharacter()) + { + pfAttrName = "Pathfinding_Object_Attr_Character"; + } + else if (((LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsNonPermanent()) + || LLSelectMgr::getInstance()->selectGetNonPermanent()) && + ((LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsNonCharacter()) + || LLSelectMgr::getInstance()->selectGetNonCharacter())) + { + pfAttrName = "Pathfinding_Object_Attr_None"; } else { pfAttrName = "Pathfinding_Object_Attr_MultiSelect"; } + + getChildView("pathfinding_attributes_value")->setEnabled(TRUE); getChild("pathfinding_attributes_value")->setValue(LLTrans::getString(pfAttrName)); getChildView("Permissions:")->setEnabled(TRUE); @@ -420,7 +428,7 @@ void LLPanelPermissions::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"); @@ -630,12 +638,12 @@ void LLPanelPermissions::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; @@ -848,8 +856,8 @@ void LLPanelPermissions::refresh() combo_click_action->setValue(LLSD(combo_value)); } } - 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); } -- cgit v1.2.3 From 1ca92d37ddac87c09df9716e09cd7c37d94f85e7 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Fri, 22 Jun 2012 11:24:23 -0700 Subject: PATH-760: Adding another pathfinding test method to the selection manager. --- indra/newview/llpanelpermissions.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'indra/newview/llpanelpermissions.cpp') diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 6076cb01fb..51ab7649a4 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -336,6 +336,12 @@ void LLPanelPermissions::refresh() std::string pfAttrName; if ((LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + && LLSelectMgr::getInstance()->selectGetRootsNonPathfinding()) + || LLSelectMgr::getInstance()->selectGetNonPathfinding()) + { + pfAttrName = "Pathfinding_Object_Attr_None"; + } + else if ((LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsPermanent()) || LLSelectMgr::getInstance()->selectGetPermanent()) { @@ -347,15 +353,6 @@ void LLPanelPermissions::refresh() { pfAttrName = "Pathfinding_Object_Attr_Character"; } - else if (((LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() - && LLSelectMgr::getInstance()->selectGetRootsNonPermanent()) - || LLSelectMgr::getInstance()->selectGetNonPermanent()) && - ((LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() - && LLSelectMgr::getInstance()->selectGetRootsNonCharacter()) - || LLSelectMgr::getInstance()->selectGetNonCharacter())) - { - pfAttrName = "Pathfinding_Object_Attr_None"; - } else { pfAttrName = "Pathfinding_Object_Attr_MultiSelect"; -- cgit v1.2.3