summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-06-13 16:57:35 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-06-13 16:57:35 -0700
commit379aff3520d368d1119e00f46684670030472832 (patch)
treec01d59617248723b29309fd3f16a01c4f45e7a43 /indra
parent0e8ef689babf51294c0ebae3f77a849425b5fb27 (diff)
PATH-713: Disabling all editable object fields on the build tools floater when a static pathfinding object is in not in the current region.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatertools.cpp5
-rw-r--r--indra/newview/llpanelcontents.cpp4
-rw-r--r--indra/newview/llpanelface.cpp2
-rw-r--r--indra/newview/llpanelobject.cpp15
-rw-r--r--indra/newview/llpanelpermissions.cpp12
-rw-r--r--indra/newview/llpanelvolume.cpp2
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp12
7 files changed, 29 insertions, 23 deletions
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index c8599df161..105636364c 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -1198,7 +1198,10 @@ void LLFloaterTools::getMediaState()
return;
}
- bool editable = (first_object->permModify() || selectedMediaEditable());
+ BOOL is_nonpermanent = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()
+ && LLSelectMgr::getInstance()->selectGetRootsNonPermanent())
+ || LLSelectMgr::getInstance()->selectGetNonPermanent();
+ bool editable = is_nonpermanent && (first_object->permModify() || selectedMediaEditable());
// Check modify permissions and whether any selected objects are in
// the process of being fetched. If they are, then we're not editable
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index a64b4ec94d..77e1487f38 100644
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -116,7 +116,7 @@ void LLPanelContents::getState(LLViewerObject *objectp )
// BUG? Check for all objects being editable?
bool editable = gAgent.isGodlike()
- || (objectp->permModify()
+ || (objectp->permModify() && !objectp->isPermanentEnforced()
&& ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488
BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
@@ -127,6 +127,8 @@ void LLPanelContents::getState(LLViewerObject *objectp )
((LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1)
|| (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1)));
+ getChildView("button permissions")->setEnabled(!objectp->isPermanentEnforced());
+ mPanelInventoryObject->setEnabled(!objectp->isPermanentEnforced());
}
void LLPanelContents::refresh()
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 7301b305b2..05d9a32108 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -504,7 +504,7 @@ void LLPanelFace::getState()
&& objectp->getPCode() == LL_PCODE_VOLUME
&& objectp->permModify())
{
- BOOL editable = objectp->permModify();
+ BOOL editable = objectp->permModify() && !objectp->isPermanentEnforced();
// only turn on auto-adjust button if there is a media renderer and the media is loaded
getChildView("textbox autofix")->setEnabled(editable);
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index d7d5d9a078..be4ce4700a 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -468,9 +468,16 @@ void LLPanelObject::getState( )
getChildView("select_single")->setVisible( TRUE);
getChildView("select_single")->setEnabled(TRUE);
}
+
+ BOOL is_flexible = volobjp && volobjp->isFlexible();
+ BOOL is_permanent = root_objectp->flagObjectPermanent();
+ BOOL is_permanent_enforced = root_objectp->isPermanentEnforced();
+ BOOL is_character = root_objectp->flagCharacter();
+ llassert(!is_permanent || !is_character); // should never have a permanent object that is also a character
+
// Lock checkbox - only modifiable if you own the object.
BOOL self_owned = (gAgent.getID() == owner_id);
- mCheckLock->setEnabled( roots_selected > 0 && self_owned );
+ mCheckLock->setEnabled( roots_selected > 0 && self_owned && !is_permanent_enforced);
// More lock and debit checkbox - get the values
BOOL valid;
@@ -500,12 +507,6 @@ void LLPanelObject::getState( )
}
}
- BOOL is_flexible = volobjp && volobjp->isFlexible();
- BOOL is_permanent = root_objectp->flagObjectPermanent();
- BOOL is_permanent_enforced = root_objectp->isPermanentEnforced();
- BOOL is_character = root_objectp->flagCharacter();
- llassert(!is_permanent || !is_character); // should never have a permanent object that is also a character
-
// Physics checkbox
mIsPhysical = root_objectp->flagUsePhysics();
llassert(!is_permanent || !mIsPhysical); // should never have a permanent object that is also physical
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<LLLineEditor>("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);
}
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index 792d852d53..13b746dbab 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -258,7 +258,7 @@ void LLPanelVolume::getState( )
owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
// BUG? Check for all objects being editable?
- BOOL editable = root_objectp->permModify();
+ BOOL editable = root_objectp->permModify() && !root_objectp->isPermanentEnforced();
BOOL single_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )
&& LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1;
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<LLLineEditor>("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())
{