Interim commit before diving into reworking the inventory panel.

This commit is contained in:
Shyotl
2012-02-16 19:25:59 -06:00
parent a90d7bbb46
commit ae7b12f230
94 changed files with 15690 additions and 8311 deletions

View File

@@ -41,6 +41,7 @@ LLInventoryClipboard LLInventoryClipboard::sInstance;
///----------------------------------------------------------------------------
LLInventoryClipboard::LLInventoryClipboard()
: mCutMode(false)
{
}
@@ -71,6 +72,16 @@ void LLInventoryClipboard::store(const LLDynamicArray<LLUUID>& inv_objects)
}
}
void LLInventoryClipboard::cut(const LLUUID& object)
{
if(!mCutMode && !mObjects.empty())
{
//looks like there are some stored items, reset clipboard state
reset();
}
mCutMode = true;
add(object);
}
void LLInventoryClipboard::retrieve(LLDynamicArray<LLUUID>& inv_objects) const
{
inv_objects.reset();
@@ -84,6 +95,7 @@ void LLInventoryClipboard::retrieve(LLDynamicArray<LLUUID>& inv_objects) const
void LLInventoryClipboard::reset()
{
mObjects.reset();
mCutMode = false;
}
// returns true if the clipboard has something pasteable in it.