summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepaneliteminfo.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2010-02-26 19:18:15 -0800
committerRoxie Linden <roxie@lindenlab.com>2010-02-26 19:18:15 -0800
commita2efe4bb4154b7ecb9c7cb279f7a28d7d401a93a (patch)
tree4cafd0e64a9c45b444664d12f022cd3e675bfebd /indra/newview/llsidepaneliteminfo.cpp
parent5352954eb65076d877cc74d4328620e910b93d1c (diff)
parent1ae70e112a466a6ed5baf4e05c1771218c78b2f5 (diff)
automated merge
Diffstat (limited to 'indra/newview/llsidepaneliteminfo.cpp')
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 94fe95d215..0275736f6d 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -109,9 +109,9 @@ BOOL LLSidepanelItemInfo::postBuild()
{
LLSidepanelInventorySubpanel::postBuild();
- childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("LabelItemName",&LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitName,this));
- childSetPrevalidate("LabelItemDesc",&LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("LabelItemDesc",&LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this));
// Creator information
getChild<LLUICtrl>("BtnCreator")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onClickCreator,this));
@@ -231,20 +231,23 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
// PERMISSIONS LOOKUP //
////////////////////////
+ llassert(item);
+ if (!item) return;
+
// do not enable the UI for incomplete items.
BOOL is_complete = item->isComplete();
const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType());
const BOOL is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD);
const LLPermissions& perm = item->getPermissions();
const BOOL can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm,
- GP_OBJECT_MANIPULATE);
+ GP_OBJECT_MANIPULATE);
const BOOL can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm,
- GP_OBJECT_SET_SALE) &&
+ GP_OBJECT_SET_SALE) &&
!cannot_restrict_permissions;
const BOOL is_link = item->getIsLinkType();
const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
- bool not_in_trash = item && (item->getUUID() != trash_id) && !gInventory.isObjectDescendentOf(item->getUUID(), trash_id);
+ bool not_in_trash = (item->getUUID() != trash_id) && !gInventory.isObjectDescendentOf(item->getUUID(), trash_id);
// You need permission to modify the object to modify an inventory
// item in it.