summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorJonathan Yap <none@none>2012-06-09 11:43:39 -0400
committerJonathan Yap <none@none>2012-06-09 11:43:39 -0400
commitb6df9b6d56108bcf4b3e8dfd875ef76a9b6f448b (patch)
tree6b1f12b9235f3a2c6d785d91615ffa26ce32b650 /indra/newview/llviewerobject.cpp
parentd61a5f743c5d3bde0146b036508485bfdc9c3cb5 (diff)
STORM-68 Fiddling with debugging for New Script case
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index a494e934b0..57549e025c 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2555,6 +2555,17 @@ void LLViewerObject::doUpdateInventory(
doInventoryCallback();
++mInventorySerialNum;
}
+
+ if(is_new && mInventory)
+ {
+ std::string name = item->getName();
+llwarns << "DBG " << name << llendl;
+ LLPermissions perm = item->getPermissions();
+ perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Scripts"));
+ perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts"));
+ perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts"));
+ item->setPermissions(perm);
+ }
}
// save a script, which involves removing the old one, and rezzing
@@ -2573,13 +2584,8 @@ void LLViewerObject::saveScript(
*/
lldebugs << "LLViewerObject::saveScript() " << item->getUUID() << " " << item->getAssetUUID() << llendl;
- LLPermissions perm = item->getPermissions();
- perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Scripts"));
- perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts"));
- perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts"));
-
LLPointer<LLViewerInventoryItem> task_item =
- new LLViewerInventoryItem(item->getUUID(), mID, perm,
+ new LLViewerInventoryItem(item->getUUID(), mID, item->getPermissions(),
item->getAssetUUID(), item->getType(),
item->getInventoryType(),
item->getName(), item->getDescription(),
@@ -2603,8 +2609,6 @@ void LLViewerObject::saveScript(
// do the internal logic
doUpdateInventory(task_item, TASK_INVENTORY_ITEM_KEY, is_new);
-llwarns << "DBG is_new:" << is_new << llendl;
- task_item->setPermissions(perm);
}
void LLViewerObject::moveInventory(const LLUUID& folder_id,