Sync with obsidian in attempt to fix SV-2086
Applies MAINT-4897 FIXED Frequent error when texturing a linkset - "Unable to add texture. Please wait a few seconds and try again." Applies MAINT-5547 FIXED errors when texturing a linkset "Unable to add texture. Please wait a few seconds and try again."
This commit is contained in:
@@ -2594,6 +2594,11 @@ void LLViewerObject::clearInventoryListeners()
|
||||
mInventoryCallbacks.clear();
|
||||
}
|
||||
|
||||
bool LLViewerObject::hasInventoryListeners()
|
||||
{
|
||||
return !mInventoryCallbacks.empty();
|
||||
}
|
||||
|
||||
void LLViewerObject::requestInventory()
|
||||
{
|
||||
if(mInventoryDirty && mInventory && !mInventoryCallbacks.empty())
|
||||
@@ -2601,15 +2606,20 @@ void LLViewerObject::requestInventory()
|
||||
mInventory->clear(); // will deref and delete entries
|
||||
delete mInventory;
|
||||
mInventory = NULL;
|
||||
mInventoryDirty = FALSE; //since we are going to request it now
|
||||
}
|
||||
|
||||
if(mInventory)
|
||||
{
|
||||
// inventory is either up to date or doesn't has a listener
|
||||
// if it is dirty, leave it this way in case we gain a listener
|
||||
doInventoryCallback();
|
||||
}
|
||||
// throw away duplicate requests
|
||||
else
|
||||
{
|
||||
// since we are going to request it now
|
||||
mInventoryDirty = FALSE;
|
||||
|
||||
// Note: throws away duplicate requests
|
||||
fetchInventoryFromServer();
|
||||
}
|
||||
}
|
||||
@@ -2619,8 +2629,6 @@ void LLViewerObject::fetchInventoryFromServer()
|
||||
if (!mInventoryPending)
|
||||
{
|
||||
delete mInventory;
|
||||
mInventory = NULL;
|
||||
mInventoryDirty = FALSE;
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessageFast(_PREHASH_RequestTaskInventory);
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
|
||||
Reference in New Issue
Block a user