diff options
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 8d3ac3e723..fbed8e31ff 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -73,7 +73,7 @@ #include "llwearablelist.h" // Marketplace outbox current disabled -#define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 0 +#define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 1 #define ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU 0 #define BLOCK_WORN_ITEMS_IN_OUTBOX 1 @@ -486,11 +486,11 @@ BOOL LLInvFVBridge::isClipboardPasteable() const // Folders are pastable if all items in there are copyable const LLInventoryCategory *cat = model->getCategory(item_id); - if (cat) + if (cat) { LLFolderBridge cat_br(mInventoryPanel.get(), mRoot, item_id); if (!cat_br.isItemCopyable()) - return FALSE; + return FALSE; // Skip to the next item in the clipboard continue; } @@ -498,8 +498,8 @@ BOOL LLInvFVBridge::isClipboardPasteable() const // Each item must be copyable to be pastable LLItemBridge item_br(mInventoryPanel.get(), mRoot, item_id); if (!item_br.isItemCopyable()) - return FALSE; - } + return FALSE; + } return TRUE; } @@ -1770,7 +1770,7 @@ LLHandle<LLFolderBridge> LLFolderBridge::sSelf; BOOL LLFolderBridge::isItemMovable() const { LLInventoryObject* obj = getInventoryObject(); - if (obj) + if(obj) { // If it's a protected type folder, we can't move it if (LLFolderType::lookupIsProtectedType(((LLInventoryCategory*)obj)->getPreferredType())) @@ -1856,20 +1856,20 @@ BOOL LLFolderBridge::isItemCopyable() const LLItemBridge item_br(mInventoryPanel.get(), mRoot, item->getUUID()); if (!item_br.isItemCopyable()) return FALSE; - } - +} + // Check the folders LLInventoryModel::cat_array_t cat_array_copy = *cat_array; for (LLInventoryModel::cat_array_t::iterator iter = cat_array_copy.begin(); iter != cat_array_copy.end(); iter++) - { +{ LLViewerInventoryCategory* category = *iter; LLFolderBridge cat_br(mInventoryPanel.get(), mRoot, category->getUUID()); if (!cat_br.isItemCopyable()) return FALSE; } - return TRUE; -} + return TRUE; + } BOOL LLFolderBridge::isClipboardPasteable() const { @@ -2522,13 +2522,13 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer) llwarns << "LLRightClickInventoryFetchDescendentsObserver::done with empty mCompleteFolders" << llendl; if (clear_observer) { - dec_busy_count(); - gInventory.removeObserver(this); - delete this; + dec_busy_count(); + gInventory.removeObserver(this); + delete this; } return; } - + // Copy the list of complete fetched folders while "this" is still valid uuid_vec_t completed_folder = mComplete; @@ -2540,7 +2540,7 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer) gInventory.removeObserver(this); delete this; } - + for (uuid_vec_t::iterator current_folder = completed_folder.begin(); current_folder != completed_folder.end(); ++current_folder) { // Get the information on the fetched folder items and subfolders and fetch those @@ -2553,9 +2553,9 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer) // Move to next if current folder empty if ((item_count == 0) && (cat_count == 0)) - { + { continue; - } + } uuid_vec_t ids; LLRightClickInventoryFetchObserver* outfit = NULL; @@ -2583,23 +2583,23 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer) // Perform the item fetch if (outfit) { - outfit->startFetch(); + outfit->startFetch(); outfit->execute(); // Not interested in waiting and this will be right 99% of the time. delete outfit; - // Uncomment the following code for laggy Inventory UI. +//Uncomment the following code for laggy Inventory UI. /* if (outfit->isFinished()) - { - // everything is already here - call done. + { + // everything is already here - call done. outfit->execute(); delete outfit; - } - else - { + } + else + { // it's all on its way - add an observer, and the inventory - // will call done for us when everything is here. + // will call done for us when everything is here. inc_busy_count(); - gInventory.addObserver(outfit); + gInventory.addObserver(outfit); } */ } @@ -2957,7 +2957,7 @@ bool LLFolderBridge::removeItemResponse(const LLSD& notification, const LLSD& re void LLFolderBridge::pasteFromClipboard() { LLInventoryModel* model = getInventoryModel(); - if (model && isClipboardPasteable()) + if(model && isClipboardPasteable()) { const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); @@ -3041,15 +3041,15 @@ void LLFolderBridge::pasteFromClipboard() } } else + { + LLViewerInventoryItem* viitem = dynamic_cast<LLViewerInventoryItem*>(item); + llassert(viitem); + if (viitem) { - LLViewerInventoryItem* viitem = dynamic_cast<LLViewerInventoryItem*>(item); - llassert(viitem); - if (viitem) - { - changeItemParent(model, viitem, parent_id, FALSE); - } + changeItemParent(model, viitem, parent_id, FALSE); } } + } else { // Do a "copy" to "paste" a regular copy clipboard @@ -3062,19 +3062,19 @@ void LLFolderBridge::pasteFromClipboard() copy_inventory_category(model, vicat, parent_id); } } - else - { - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - parent_id, - std::string(), - LLPointer<LLInventoryCallback>(NULL)); - } + else + { + copy_inventory_item( + gAgent.getID(), + item->getPermissions().getOwner(), + item->getUUID(), + parent_id, + std::string(), + LLPointer<LLInventoryCallback>(NULL)); } } } + } // Change mode to paste for next paste LLClipboard::instance().setCutMode(false); } |