diff options
-rw-r--r-- | indra/newview/llpanelobjectinventory.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llpanelobjectinventory.h | 6 |
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; }; |