summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-08-03 15:23:24 -0700
committerRichard Linden <none@none>2012-08-03 15:23:24 -0700
commit06e1887f2f6ce341d1a4a22d4629031201e0f830 (patch)
treecf14e31b14c79860530add85943b4c4a3135dd3e /indra/newview
parentc66164d4b469a4154134dc1a6b21f491ed8c31e6 (diff)
parentaf8d113557105075af0e010c560ba9846d812aa0 (diff)
Automated merge with ssh://hg.lindenlab.com/richard/viewer-chui
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinventorypanel.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index d6a685541f..49bc3aae0b 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -600,6 +600,18 @@ void LLInventoryPanel::onIdle(void *userdata)
}
}
+struct DirtyFilterFunctor : public LLFolderViewFunctor
+{
+ /*virtual*/ void doFolder(LLFolderViewFolder* folder)
+ {
+ folder->getViewModelItem()->dirtyFilter();
+ }
+ /*virtual*/ void doItem(LLFolderViewItem* item)
+ {
+ item->getViewModelItem()->dirtyFilter();
+ }
+};
+
void LLInventoryPanel::idle(void* user_data)
{
LLInventoryPanel* panel = (LLInventoryPanel*)user_data;
@@ -607,25 +619,13 @@ void LLInventoryPanel::idle(void* user_data)
if (panel->mClipboardState != LLClipboard::instance().getGeneration())
{
panel->mClipboardState = LLClipboard::instance().getGeneration();
- if (LLClipboard::instance().isCutMode())
+ const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
+ LLFolderViewFolder* trash_folder = panel->getFolderByID(trash_id);
+ if (trash_folder)
{
- LLDynamicArray<LLUUID> objects;
- LLClipboard::instance().pasteFromClipboard(objects);
-
- for (LLDynamicArray<LLUUID>::iterator it = objects.begin(), end_it = objects.end();
- it != end_it;
- ++it)
- {
- LLFolderViewItem* item = panel->getItemByID(*it);
- if (item)
- {
- item->getViewModelItem()->dirtyFilter();
- }
- }
- /*panel->getFilter().setModified(LLClipboard::instance().isCutMode()
- ? LLInventoryFilter::FILTER_MORE_RESTRICTIVE
- : LLInventoryFilter::FILTER_LESS_RESTRICTIVE);*/
+ trash_folder->applyFunctorToChildren(DirtyFilterFunctor());
}
+
}
panel->mFolderRoot->update();