summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-03-13 21:37:54 -0700
committerMerov Linden <merov@lindenlab.com>2012-03-13 21:37:54 -0700
commit9dfb6284df315588b0a387725965e3626d63784c (patch)
tree2b80ad4c35cde6fd3d9d95761b1f24bc02024852 /indra/llui
parent82700548058527001657758888cf79df099064b3 (diff)
EXP-1924 : Relax the cconsistency policy between text and UUID on the clipboard.
Diffstat (limited to 'indra/llui')
-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.
};