From bb6ace0672fa5e1c47c534ba74396ef04daa408b Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 17 Feb 2012 14:42:12 -0800 Subject: EXP-1902, EXP-1903 : Move items cut to the trash when clipboard reset. --- indra/newview/llfolderview.cpp | 5 +---- indra/newview/llfolderview.h | 2 +- indra/newview/llinventorybridge.cpp | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 0abfa9db8e..52cc70aee7 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1014,6 +1014,7 @@ bool isDescendantOfASelectedItem(LLFolderViewItem* item, const std::vector exit @@ -2139,10 +2140,6 @@ bool LLFolderView::doToSelected(LLInventoryModel* model, const LLSD& userdata) } if (("copy" == action) || ("cut" == action)) { - // If there are things on the clipboard that have not been pasted but - // already disappeared from view, we need to move them to the trash - removeCutItems(); - // Clear the clipboard before we start adding things on it LLClipboard::getInstance()->reset(); } diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 2f148d4e25..9a1df5a142 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -159,7 +159,7 @@ public: // deletion functionality void removeSelectedItems(); - void removeCutItems(); + static void removeCutItems(); // open the selected item. void openSelectedItems( void ); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index eb0f9803b0..54d195a2e6 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -213,7 +213,7 @@ BOOL LLInvFVBridge::cutToClipboard() const const LLInventoryObject* obj = gInventory.getObject(mUUID); if (obj && isItemMovable() && isItemRemovable()) { - LLClipboard::getInstance()->setCutMode(true); + LLClipboard::getInstance()->setCutMode(true, boost::bind(LLFolderView::removeCutItems)); return LLClipboard::getInstance()->addToClipboard(mUUID,obj->getType()); } return FALSE; -- cgit v1.2.3