summaryrefslogtreecommitdiff
path: root/indra/llui/llclipboard.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-02-17 14:42:12 -0800
committerMerov Linden <merov@lindenlab.com>2012-02-17 14:42:12 -0800
commitbb6ace0672fa5e1c47c534ba74396ef04daa408b (patch)
tree701f16864159f3777c29f27049b33066da2e8e3d /indra/llui/llclipboard.cpp
parent6363145f4556f3213f943637866445fae407593a (diff)
EXP-1902, EXP-1903 : Move items cut to the trash when clipboard reset.
Diffstat (limited to 'indra/llui/llclipboard.cpp')
-rw-r--r--indra/llui/llclipboard.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llui/llclipboard.cpp b/indra/llui/llclipboard.cpp
index ee1f1aa816..e0729366cc 100644
--- a/indra/llui/llclipboard.cpp
+++ b/indra/llui/llclipboard.cpp
@@ -47,9 +47,17 @@ LLClipboard::~LLClipboard()
void LLClipboard::reset()
{
+ // Increment the clipboard state
mState++;
+ // Call the cleanup function (if any) before releasing the object list
+ if (mCutMode && mCleanupCallback)
+ {
+ mCleanupCallback();
+ }
+ // Clear the clipboard
mObjects.reset();
mCutMode = false;
+ mCleanupCallback = NULL;
mString = LLWString();
}