aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llinventoryclipboard.cpp
diff options
context:
space:
mode:
authorRevolutionSmythe2010-10-26 16:08:09 -0500
committerMcCabe Maxsted2010-11-01 17:02:17 -0700
commit8f9e76c53c662fd06b1a88288cc84f54e465be8e (patch)
treecaa57683778e4fe6dc515f5e7cd516ea57610deb /linden/indra/newview/llinventoryclipboard.cpp
parentMerges the Message log and Message builder from Inertia in. (diff)
downloadmeta-impy-8f9e76c53c662fd06b1a88288cc84f54e465be8e.zip
meta-impy-8f9e76c53c662fd06b1a88288cc84f54e465be8e.tar.gz
meta-impy-8f9e76c53c662fd06b1a88288cc84f54e465be8e.tar.bz2
meta-impy-8f9e76c53c662fd06b1a88288cc84f54e465be8e.tar.xz
Bug fixes for earlier commits. Adds cut to the inventory panel along with copy and paste.
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llinventoryclipboard.cpp18
1 files changed, 17 insertions, 1 deletions
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)
60 mObjects.put(object); 60 mObjects.put(object);
61} 61}
62 62
63void LLInventoryClipboard::addCut(const LLUUID& object)
64{
65 mCutObjects.put(object);
66}
67
63// this stores a single inventory object 68// this stores a single inventory object
64void LLInventoryClipboard::store(const LLUUID& object) 69void LLInventoryClipboard::store(const LLUUID& object)
65{ 70{
@@ -87,15 +92,26 @@ void LLInventoryClipboard::retrieve(LLDynamicArray<LLUUID>& inv_objects) const
87 } 92 }
88} 93}
89 94
95void LLInventoryClipboard::retrieveCuts(LLDynamicArray<LLUUID>& inv_objects) const
96{
97 inv_objects.reset();
98 S32 count = mCutObjects.count();
99 for(S32 i = 0; i < count; i++)
100 {
101 inv_objects.put(mCutObjects[i]);
102 }
103}
104
90void LLInventoryClipboard::reset() 105void LLInventoryClipboard::reset()
91{ 106{
92 mObjects.reset(); 107 mObjects.reset();
108 mCutObjects.reset();
93} 109}
94 110
95// returns true if the clipboard has something pasteable in it. 111// returns true if the clipboard has something pasteable in it.
96BOOL LLInventoryClipboard::hasContents() const 112BOOL LLInventoryClipboard::hasContents() const
97{ 113{
98 return (mObjects.count() > 0); 114 return (mObjects.count() > 0) || (mCutObjects.count() > 0);
99} 115}
100 116
101 117