summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llclipboard.cpp5
-rw-r--r--indra/llui/llclipboard.h6
2 files changed, 5 insertions, 6 deletions
diff --git a/indra/llui/llclipboard.cpp b/indra/llui/llclipboard.cpp
index 7bf62b5bfc..14173fdbb0 100644
--- a/indra/llui/llclipboard.cpp
+++ b/indra/llui/llclipboard.cpp
@@ -133,11 +133,6 @@ bool LLClipboard::pasteFromClipboard(LLWString &dst, bool use_primary)
bool res = (use_primary ? LLView::getWindow()->pasteTextFromPrimary(dst) : LLView::getWindow()->pasteTextFromClipboard(dst));
if (res)
{
- if (dst != mString)
- {
- // Invalidate the LL clipboard if the System had a different string in it (i.e. some copy/cut was done in some other app)
- reset();
- }
mString = dst;
}
return res;
diff --git a/indra/llui/llclipboard.h b/indra/llui/llclipboard.h
index 7f31f66bbe..fd2e7610df 100644
--- a/indra/llui/llclipboard.h
+++ b/indra/llui/llclipboard.h
@@ -41,6 +41,10 @@
//
// This class is used to cut/copy/paste text strings and inventory items around
// the world. Use LLClipboard::instance().method() to use its methods.
+// Note that the text and UUIDs are loosely coupled only. There are few cases
+// where the viewer does offer a serialized version of the UUID on the clipboard.
+// In those case, the text is overridden when copying/cutting the item.
+// In all other cases, the text and the UUIDs are very much independent.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLClipboard : public LLSingleton<LLClipboard>
@@ -82,7 +86,7 @@ public:
private:
std::vector<LLUUID> mObjects; // Objects on the clipboard. Can be empty while mString contains something licit (e.g. text from chat)
- LLWString mString; // The text string. If mObjects is not empty, this string is reflecting them (UUIDs for the moment).
+ LLWString mString; // The text string. If mObjects is not empty, this string is reflecting them (UUIDs for the moment) if the asset type is knowable.
bool mCutMode; // This is a convenience flag for the viewer.
int mGeneration; // Incremented when the clipboard changes so that interested parties can check for changes on the clipboard.
};