From 39659f3c034c5cb335e185d1411e808d272f8065 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 3 Apr 2014 15:17:31 -0700 Subject: DD-20 : Handle edge cases a bit more cleanly --- indra/newview/llfloatermarketplacelistings.cpp | 2 +- indra/newview/llinventorybridge.cpp | 3 +-- indra/newview/llinventorymodel.cpp | 1 - indra/newview/llinventorypanel.cpp | 3 ++- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 814f1b218a..e8257e52c4 100755 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -466,7 +466,7 @@ BOOL LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BO BOOL handled = (handled_view != NULL); // Pass all drag and drop for this floater to the marketplace listings inventory control - if (!handled || !isAccepted(*accept)) + if (!handled && isAccepted(*accept) && !mPanelListings->getVisible() && mRootFolderId.notNull()) { LLFolderView* root_folder = mPanelListings->getRootFolder(); handled = root_folder->handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 68418063e7..09fd0527b9 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2345,7 +2345,6 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); const BOOL move_is_from_outbox = model->isObjectDescendentOf(cat_id, outbox_id); const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); - const BOOL move_is_from_marketplacelistings = model->isObjectDescendentOf(cat_id, marketplacelistings_id); // check to make sure source is agent inventory, and is represented there. LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); @@ -2633,7 +2632,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, { copy_folder_to_outbox(inv_cat, mUUID, cat_id, LLToolDragAndDrop::getOperationId()); } - else if (move_is_into_marketplacelistings && !move_is_from_marketplacelistings) + else if (move_is_into_marketplacelistings) { move_folder_to_marketplacelistings(inv_cat, mUUID); } diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 269542d383..96a2db5afb 100755 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1058,7 +1058,6 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat) { mask |= LLInventoryObserver::LABEL; } - llinfos << "Merov : updateCategory : " << cat->getName() << llendl; old_cat->copyViewerCategory(cat); addChangedMask(mask, cat->getUUID()); } diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 6305275a08..7d774110bd 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -568,7 +568,8 @@ void LLInventoryPanel::modelChanged(U32 mask) else if (!model_item && view_item && viewmodel_item) { // Remove the item's UI. - removeItemID(viewmodel_item->getUUID()); + const LLUUID& idp = viewmodel_item->getUUID(); + removeItemID(idp); view_item->destroyView(); } } -- cgit v1.2.3