diff options
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 9403ccdabe..d6a685541f 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -514,10 +514,13 @@ void LLInventoryPanel::modelChanged(U32 mask) } else { + // Remove the item ID before destroying the view because the view-model-item gets + // destroyed when the view is destroyed + removeItemID(viewmodel_item->getUUID()); + // Item is to be moved outside the panel's directory (e.g. moved to trash for a panel that // doesn't include trash). Just remove the item's UI. view_item->destroyView(); - removeItemID(viewmodel_item->getUUID()); } } } @@ -604,9 +607,25 @@ void LLInventoryPanel::idle(void* user_data) if (panel->mClipboardState != LLClipboard::instance().getGeneration()) { panel->mClipboardState = LLClipboard::instance().getGeneration(); - panel->getFilter().setModified(LLClipboard::instance().isCutMode() - ? LLInventoryFilter::FILTER_MORE_RESTRICTIVE - : LLInventoryFilter::FILTER_LESS_RESTRICTIVE); + if (LLClipboard::instance().isCutMode()) + { + 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);*/ + } } panel->mFolderRoot->update(); |