summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-03-08 21:06:00 -0800
committerMerov Linden <merov@lindenlab.com>2012-03-08 21:06:00 -0800
commit5170f18d3cecc757cae2779d9e271272e24d160b (patch)
tree7a7e3476c23d58b9ab0b9adab7f2f20cef0112a8
parent45f5a027f64ca1e16059757353d9d206160ed66f (diff)
EXP-1917 : Suppress clean up callback now that we move things to the trash immediately
-rw-r--r--indra/llui/llclipboard.cpp6
-rw-r--r--indra/llui/llclipboard.h7
2 files changed, 2 insertions, 11 deletions
diff --git a/indra/llui/llclipboard.cpp b/indra/llui/llclipboard.cpp
index 75c197463c..cc5b219e6f 100644
--- a/indra/llui/llclipboard.cpp
+++ b/indra/llui/llclipboard.cpp
@@ -49,15 +49,9 @@ void LLClipboard::reset()
{
// Increment the clipboard count
mGeneration++;
- // Call the cleanup function (if any) before releasing the object list
- if (mCutMode && mCleanupCallback)
- {
- mCleanupCallback();
- }
// Clear the clipboard
mObjects.clear();
mCutMode = false;
- mCleanupCallback = NULL;
mString = LLWString();
}
diff --git a/indra/llui/llclipboard.h b/indra/llui/llclipboard.h
index 8b5a2260ae..7f31f66bbe 100644
--- a/indra/llui/llclipboard.h
+++ b/indra/llui/llclipboard.h
@@ -36,8 +36,6 @@
#include "llassettype.h"
#include "llinventory.h"
-typedef boost::function<void ()> cleanup_callback_t;
-
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLClipboard
//
@@ -80,13 +78,12 @@ public:
bool isOnClipboard(const LLUUID& object) const; // True if the input object uuid is on the clipboard
bool isCutMode() const { return mCutMode; }
- void setCutMode(bool mode, cleanup_callback_t cb = NULL) { mCutMode = mode; mCleanupCallback = cb; mGeneration++; }
+ void setCutMode(bool mode) { mCutMode = mode; mGeneration++; }
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).
- bool mCutMode; // This is a convenience flag for the viewer. Will determine if mCleanupCallback() needs to be called.
- cleanup_callback_t mCleanupCallback;// Function to call when the cut clipboard is being wiped out. Can be set to NULL (nothing done then).
+ 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.
};