summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llpreviewnotecard.cpp10
-rw-r--r--indra/newview/llpreviewnotecard.h1
-rw-r--r--indra/newview/llviewertexteditor.h3
3 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 850c3b350d..d4a8bbdf45 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -163,6 +163,16 @@ BOOL LLPreviewNotecard::canClose()
}
}
+/* virtual */
+void LLPreviewNotecard::setObjectID(const LLUUID& object_id)
+{
+ LLPreview::setObjectID(object_id);
+
+ LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
+ editor->setNotecardObjectID(mObjectUUID);
+ editor->makePristine();
+}
+
const LLInventoryItem* LLPreviewNotecard::getDragItem()
{
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index 017c4485ba..46a6d0ef50 100644
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -47,6 +47,7 @@ public:
virtual ~LLPreviewNotecard();
bool saveItem();
+ void setObjectID(const LLUUID& object_id);
// llview
virtual void draw();
diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h
index 33cfca4f90..44f104dde1 100644
--- a/indra/newview/llviewertexteditor.h
+++ b/indra/newview/llviewertexteditor.h
@@ -71,7 +71,8 @@ public:
mObjectID = object_id;
mPreviewID = preview_id;
}
-
+ void setNotecardObjectID(const LLUUID& object_id){ mObjectID = object_id;}
+
void setASCIIEmbeddedText(const std::string& instr);
void setEmbeddedText(const std::string& instr);
std::string getEmbeddedText();