diff options
author | Merov Linden <merov@lindenlab.com> | 2014-06-04 09:58:11 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-06-04 09:58:11 -0700 |
commit | 252ad06b7bcc33a48b6c23917f6156a436df4b00 (patch) | |
tree | 7f8ce3d362b618895fb4e3d0f1fed18a0935937d /indra | |
parent | 86d75052f65149da6bbe1ade5ea28b6f01aaba17 (diff) |
DD-84 : Final clean up for this fix
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/llui/llfolderview.cpp | 1 | ||||
-rwxr-xr-x | indra/newview/llinventorybridge.cpp | 18 | ||||
-rwxr-xr-x | indra/newview/llinventoryfunctions.cpp | 8 | ||||
-rwxr-xr-x | indra/newview/llinventoryfunctions.h | 2 | ||||
-rwxr-xr-x | indra/newview/llinventorymodel.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/llmarketplacefunctions.cpp | 12 |
6 files changed, 18 insertions, 25 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 537f2ac4d7..2fb57d55e7 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -946,7 +946,6 @@ void LLFolderView::cut() if (listener) { listener->cutToClipboard(); - //listener->removeItem(); } } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index b471b0ca15..0f62c8555d 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -273,12 +273,12 @@ BOOL LLInvFVBridge::cutToClipboard() if (cut_from_marketplacelistings && LLMarketplaceData::instance().isInActiveFolder(mUUID)) { - // Prompt the user if cutting from marketplace active listing + // Prompt the user if cutting from a marketplace active listing LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(&LLInvFVBridge::callback_cutToClipboard, this, _1, _2)); } else { - // Otherwise just do the cut + // Otherwise just perform the cut return perform_cutToClipboard(); } } @@ -302,11 +302,9 @@ BOOL LLInvFVBridge::perform_cutToClipboard() if (obj && isItemMovable() && isItemRemovable()) { LLClipboard::instance().setCutMode(true); - if (LLClipboard::instance().addToClipboard(mUUID)) - { - removeObject(&gInventory, mUUID); - return TRUE; - } + BOOL added_to_clipboard = LLClipboard::instance().addToClipboard(mUUID); + removeObject(&gInventory, mUUID); // Always perform the remove even if the object couldn't make it to the clipboard + return added_to_clipboard; } return FALSE; } @@ -1517,7 +1515,6 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) else if ("cut" == action) { cutToClipboard(); - //removeObject(model, mUUID); return; } else if ("copy" == action) @@ -2937,7 +2934,6 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) else if ("cut" == action) { cutToClipboard(); - //removeObject(model, mUUID); return; } else if ("copy" == action) @@ -3245,7 +3241,7 @@ void LLFolderBridge::pasteFromClipboard() if (paste_into_marketplacelistings && !LLMarketplaceData::instance().isListed(mUUID) && LLMarketplaceData::instance().isInActiveFolder(mUUID)) { - // Prompt the user if pasting in marketplace active version listing (note that pasting right in the listing folder doesn't need a prompt) + // Prompt the user if pasting in a marketplace active version listing (note that pasting right under the listing folder root doesn't need a prompt) LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(&LLFolderBridge::callback_pasteFromClipboard, this, _1, _2)); } else @@ -3271,8 +3267,6 @@ void LLFolderBridge::perform_pasteFromClipboard() LLInventoryModel* model = getInventoryModel(); 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); const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index f832237b8d..da8c03eb7c 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -141,7 +141,7 @@ void update_marketplace_folder_hierarchy(const LLUUID cat_id) return; } -void update_marketplace_category(const LLUUID& cur_uuid, bool skip_consistency_enforcement) +void update_marketplace_category(const LLUUID& cur_uuid, bool perform_consistency_enforcement) { // When changing the marketplace status of an item, we usually have to change the status of all // folders in the same listing. This is because the display of each folder is affected by the @@ -160,7 +160,7 @@ void update_marketplace_category(const LLUUID& cur_uuid, bool skip_consistency_e LLUUID listing_uuid = nested_parent_id(cur_uuid, depth); // Verify marketplace data consistency for this listing - if (!skip_consistency_enforcement && LLMarketplaceData::instance().isListed(listing_uuid)) + if (perform_consistency_enforcement && LLMarketplaceData::instance().isListed(listing_uuid)) { LLUUID version_folder_uuid = LLMarketplaceData::instance().getVersionFolder(listing_uuid); if (version_folder_uuid.notNull() && !gInventory.isObjectDescendentOf(version_folder_uuid, listing_uuid)) @@ -176,7 +176,7 @@ void update_marketplace_category(const LLUUID& cur_uuid, bool skip_consistency_e } else if (depth < 0) { - if (!skip_consistency_enforcement && LLMarketplaceData::instance().isListed(cur_uuid)) + if (perform_consistency_enforcement && LLMarketplaceData::instance().isListed(cur_uuid)) { LL_INFOS("SLM") << "Disassociate as the listing folder is not under the marketplace folder anymore!!" << LL_ENDL; LLMarketplaceData::instance().clearListing(cur_uuid); @@ -1929,7 +1929,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root std::set<LLFolderViewItem*> selected_items = root->getSelectionList(); // Prompt the user for some marketplace active listing edits - if (user_confirm && (("cut" == action) || ("delete" == action) || ("rename" == action) || ("properties" == action) || ("task_properties" == action))) + if (user_confirm && (("delete" == action) || ("rename" == action) || ("properties" == action) || ("task_properties" == action))) { std::set<LLFolderViewItem*>::iterator set_iter = selected_items.begin(); LLFolderViewModelItemInventory * viewModel = NULL; diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index d52618d795..1fcc23cb69 100755 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -59,7 +59,7 @@ void show_item_original(const LLUUID& item_uuid); void reset_inventory_filter(); // Nudge the listing categories in the inventory to signal that their marketplace status changed -void update_marketplace_category(const LLUUID& cat_id, bool skip_consistency_enforcement = false); +void update_marketplace_category(const LLUUID& cat_id, bool perform_consistency_enforcement = true); // Nudge all listing categories to signal that their marketplace status changed void update_all_marketplace_count(); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 110f514017..ea9658e51e 100755 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1541,7 +1541,7 @@ void LLInventoryModel::addChangedMask(U32 mask, const LLUUID& referent) if (referent.notNull() && (mChangedItemIDs.find(referent) == mChangedItemIDs.end())) { mChangedItemIDs.insert(referent); - update_marketplace_category(referent, true); + update_marketplace_category(referent, false); if (mask & LLInventoryObserver::ADD) { diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index d3d529cedb..d8f78ce81a 100755 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -1318,7 +1318,7 @@ bool LLMarketplaceData::addListing(const LLUUID& folder_id, S32 listing_id, cons } mMarketplaceItems[folder_id] = LLMarketplaceTuple(folder_id, listing_id, version_id, is_listed); - update_marketplace_category(folder_id, true); + update_marketplace_category(folder_id, false); gInventory.notifyObservers(); return true; } @@ -1334,7 +1334,7 @@ bool LLMarketplaceData::deleteListing(const LLUUID& folder_id, bool update_slm) if (update_slm) { - update_marketplace_category(folder_id, true); + update_marketplace_category(folder_id, false); gInventory.notifyObservers(); } return true; @@ -1438,7 +1438,7 @@ bool LLMarketplaceData::setListingID(const LLUUID& folder_id, S32 listing_id) (it->second).mListingId = listing_id; - update_marketplace_category(folder_id, true); + update_marketplace_category(folder_id, false); gInventory.notifyObservers(); return true; } @@ -1459,8 +1459,8 @@ bool LLMarketplaceData::setVersionFolderID(const LLUUID& folder_id, const LLUUID (it->second).mVersionFolderId = version_id; - update_marketplace_category(old_version_id, true); - update_marketplace_category(version_id, true); + update_marketplace_category(old_version_id, false); + update_marketplace_category(version_id, false); gInventory.notifyObservers(); return true; } @@ -1475,7 +1475,7 @@ bool LLMarketplaceData::setActivationState(const LLUUID& folder_id, bool activat (it->second).mIsActive = activate; - update_marketplace_category((it->second).mListingFolderId, true); + update_marketplace_category((it->second).mListingFolderId, false); gInventory.notifyObservers(); return true; } |