summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-04-15 17:57:57 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-04-15 17:57:57 +0300
commit6ab5182d92bd4d7897933d3952b9be23794e2cb5 (patch)
tree530813b2d9285fe42cdba9cb750810e7e6c4e00c
parent8217b47720df74f34c42f1b80a0d84f7d302e497 (diff)
SL-10953 Fixed “No contents” is displayed when adding a large number of items a few times
-rw-r--r--indra/newview/llpanelobjectinventory.cpp11
-rw-r--r--indra/newview/llpanelobjectinventory.h6
2 files changed, 12 insertions, 5 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index cd1875e995..5aa80651c4 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1498,7 +1498,14 @@ void LLPanelObjectInventory::updateInventory()
mIsInventoryEmpty = TRUE;
}
- mHaveInventory = TRUE;
+ mHaveInventory = !mIsInventoryEmpty || !objectp->isInventoryDirty();
+ if (objectp->isInventoryDirty())
+ {
+ // Inventory is dirty, yet we received inventoryChanged() callback.
+ // User changed something during ongoing request.
+ // Rerequest. It will clear dirty flag and won't create dupplicate requests.
+ objectp->requestInventory();
+ }
}
else
{
@@ -1768,7 +1775,7 @@ void LLPanelObjectInventory::deleteAllChildren()
BOOL LLPanelObjectInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
{
- if (mFolders && mHaveInventory)
+ if (mFolders)
{
LLFolderViewItem* folderp = mFolders->getNextFromChild(NULL);
if (!folderp)
diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h
index d700c8f4cf..7b9ecfb8f3 100644
--- a/indra/newview/llpanelobjectinventory.h
+++ b/indra/newview/llpanelobjectinventory.h
@@ -106,9 +106,9 @@ private:
LLUUID mTaskUUID;
LLUUID mAttachmentUUID;
- BOOL mHaveInventory;
- BOOL mIsInventoryEmpty;
- BOOL mInventoryNeedsUpdate;
+ BOOL mHaveInventory; // 'Loading' label and used for initial request
+ BOOL mIsInventoryEmpty; // 'Empty' label
+ BOOL mInventoryNeedsUpdate; // for idle, set on changed callback
LLFolderViewModelInventory mInventoryViewModel;
};