From 8f9e76c53c662fd06b1a88288cc84f54e465be8e Mon Sep 17 00:00:00 2001 From: RevolutionSmythe Date: Tue, 26 Oct 2010 16:08:09 -0500 Subject: Bug fixes for earlier commits. Adds cut to the inventory panel along with copy and paste. --- linden/indra/newview/llinventoryclipboard.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'linden/indra/newview/llinventoryclipboard.cpp') diff --git a/linden/indra/newview/llinventoryclipboard.cpp b/linden/indra/newview/llinventoryclipboard.cpp index 94ffcbd..95c22aa 100644 --- a/linden/indra/newview/llinventoryclipboard.cpp +++ b/linden/indra/newview/llinventoryclipboard.cpp @@ -60,6 +60,11 @@ void LLInventoryClipboard::add(const LLUUID& object) mObjects.put(object); } +void LLInventoryClipboard::addCut(const LLUUID& object) +{ + mCutObjects.put(object); +} + // this stores a single inventory object void LLInventoryClipboard::store(const LLUUID& object) { @@ -87,15 +92,26 @@ void LLInventoryClipboard::retrieve(LLDynamicArray& inv_objects) const } } +void LLInventoryClipboard::retrieveCuts(LLDynamicArray& inv_objects) const +{ + inv_objects.reset(); + S32 count = mCutObjects.count(); + for(S32 i = 0; i < count; i++) + { + inv_objects.put(mCutObjects[i]); + } +} + void LLInventoryClipboard::reset() { mObjects.reset(); + mCutObjects.reset(); } // returns true if the clipboard has something pasteable in it. BOOL LLInventoryClipboard::hasContents() const { - return (mObjects.count() > 0); + return (mObjects.count() > 0) || (mCutObjects.count() > 0); } -- cgit v1.1