diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 850c3b350dcb6b26f34c40571db96ddfd8e41b17..d4a8bbdf453242a8acfa3db06b16ddb38c6e0698 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 017c4485bae4744440b98de9383870459dbf1ab9..46a6d0ef501e0bc2b49d8de438106904bad6a903 100644 --- a/indra/newview/llpreviewnotecard.h +++ b/indra/newview/llpreviewnotecard.h @@ -47,6 +47,7 @@ class LLPreviewNotecard : public LLPreview 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 33cfca4f902a6888d9264a81f54fd7845558dc31..44f104dde11c2fc7ed39dde59fa1a49f119caf87 100644 --- a/indra/newview/llviewertexteditor.h +++ b/indra/newview/llviewertexteditor.h @@ -71,7 +71,8 @@ class LLViewerTextEditor : public LLTextEditor 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();