summaryrefslogtreecommitdiff
path: root/indra/newview/llpreview.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-06-25 18:41:04 +0000
committerJames Cook <james@lindenlab.com>2009-06-25 18:41:04 +0000
commit572ee5c9db2aeec17e1cc7e6c69c72ad8c7ff6fc (patch)
treebcde6f2a99d2df8bf3c9b1e752ea7b873052a4a0 /indra/newview/llpreview.cpp
parenta00af78b95a62c613f9a2ac4a28a0017086c5ffa (diff)
DEV-34488 Can not save script to a prim. Underlying issue was LLPreview holding two member variables mObjectUUID and mObjectID. mObjectID was null for scripts. It appears to be used only for notecards (?), so I converted it to mNotecardObjectID and switched references to point to mObjectUUID. Renamed one other variable to mSaveObjectID for clarity. Removed unnecessary include files and de-inlined a couple functions because I was there. Reviewed with Steve.
Diffstat (limited to 'indra/newview/llpreview.cpp')
-rw-r--r--indra/newview/llpreview.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 64713108af..676943ff87 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -61,6 +61,7 @@
LLPreview::LLPreview(const LLSD& key)
: LLFloater(key),
mItemUUID(key.asUUID()),
+ mObjectUUID(), // set later by setObjectID()
mCopyToInvBtn( NULL ),
mForceClose(FALSE),
mUserResized(FALSE),
@@ -194,6 +195,13 @@ void LLPreview::changed(U32 mask)
mDirty = TRUE;
}
+void LLPreview::setNotecardInfo(const LLUUID& notecard_inv_id,
+ const LLUUID& object_id)
+{
+ mNotecardInventoryID = notecard_inv_id;
+ mNotecardObjectID = object_id;
+}
+
void LLPreview::draw()
{
LLFloater::draw();
@@ -338,6 +346,12 @@ void LLPreview::onOpen(const LLSD& key)
}
}
+void LLPreview::setAuxItem( const LLInventoryItem* item )
+{
+ if ( mAuxItem )
+ mAuxItem->copyItem(item);
+}
+
// static
void LLPreview::onBtnCopyToInv(void* userdata)
{
@@ -349,7 +363,7 @@ void LLPreview::onBtnCopyToInv(void* userdata)
// Copy to inventory
if (self->mNotecardInventoryID.notNull())
{
- copy_inventory_from_notecard(self->mObjectID,
+ copy_inventory_from_notecard(self->mNotecardObjectID,
self->mNotecardInventoryID, item);
}
else