summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2020-10-22 18:05:33 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2020-10-22 18:05:33 +0300
commit5bfa73a12ef1fe4b8dff1a730fec6346b5835e34 (patch)
treed773fd0f57a292ddfb20596f43c6ddc38502340d
parent4b2a611596977c9c5842a4af2e66e38bf6bd0d09 (diff)
SL-14161 FIXED an item persists in inventory after dragging it to the marketplace listings
-rw-r--r--indra/newview/llinventorypanel.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 277dfe9e28..f96750fb0b 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1053,7 +1053,6 @@ LLFolderViewItem* LLInventoryPanel::buildViewsTree(const LLUUID& id,
if(items)
{
- bool has_items = parentp->getItemsCount() > 0;
for (LLViewerInventoryItem::item_array_t::const_iterator item_iter = items->begin();
item_iter != items->end();
++item_iter)
@@ -1061,19 +1060,14 @@ LLFolderViewItem* LLInventoryPanel::buildViewsTree(const LLUUID& id,
const LLViewerInventoryItem* item = (*item_iter);
if (typedViewsFilter(item->getUUID(), item))
{
- if (has_items)
- {
- // This can be optimized: we don't need to call getItemByID()
- // each time, especially since content is growing, we can just
- // iter over copy of mItemMap in some way
- LLFolderViewItem* view_itemp = getItemByID(item->getUUID());
- buildViewsTree(item->getUUID(), id, item, view_itemp, parentp);
- }
- else
- {
- buildViewsTree(item->getUUID(), id, item, NULL, parentp);
- }
+
+ // This can be optimized: we don't need to call getItemByID()
+ // each time, especially since content is growing, we can just
+ // iter over copy of mItemMap in some way
+ LLFolderViewItem* view_itemp = getItemByID(item->getUUID());
+ buildViewsTree(item->getUUID(), id, item, view_itemp, parentp);
}
+
}
}
mInventory->unlockDirectDescendentArrays(id);