Skip to content
Snippets Groups Projects
Commit ded008a8 authored by andreykproductengine's avatar andreykproductengine
Browse files

MAINT-86 Fixed object-contents aren't updated after wearing from ground

parent e51fd039
No related branches found
No related tags found
No related merge requests found
...@@ -1849,6 +1849,7 @@ void LLPanelObjectInventory::refresh() ...@@ -1849,6 +1849,7 @@ void LLPanelObjectInventory::refresh()
if(mTaskUUID != object->mID) if(mTaskUUID != object->mID)
{ {
mTaskUUID = object->mID; mTaskUUID = object->mID;
mAttachmentUUID = object->getAttachmentItemID();
make_request = TRUE; make_request = TRUE;
// This is a new object so pre-emptively clear the contents // This is a new object so pre-emptively clear the contents
...@@ -1858,6 +1859,16 @@ void LLPanelObjectInventory::refresh() ...@@ -1858,6 +1859,16 @@ void LLPanelObjectInventory::refresh()
// Register for updates from this object, // Register for updates from this object,
registerVOInventoryListener(object,NULL); registerVOInventoryListener(object,NULL);
} }
else if (mAttachmentUUID != object->getAttachmentItemID())
{
mAttachmentUUID = object->getAttachmentItemID();
if (mAttachmentUUID.notNull())
{
// Server unsubsribes viewer (deselects object) from property
// updates after "ObjectAttach" so we need to resubscribe
LLSelectMgr::getInstance()->sendSelect();
}
}
// Based on the node information, we may need to dirty the // Based on the node information, we may need to dirty the
// object inventory and get it again. // object inventory and get it again.
...@@ -1888,6 +1899,7 @@ void LLPanelObjectInventory::refresh() ...@@ -1888,6 +1899,7 @@ void LLPanelObjectInventory::refresh()
void LLPanelObjectInventory::clearInventoryTask() void LLPanelObjectInventory::clearInventoryTask()
{ {
mTaskUUID = LLUUID::null; mTaskUUID = LLUUID::null;
mAttachmentUUID = LLUUID::null;
removeVOInventoryListener(); removeVOInventoryListener();
clearContents(); clearContents();
} }
......
...@@ -105,6 +105,7 @@ class LLPanelObjectInventory : public LLPanel, public LLVOInventoryListener ...@@ -105,6 +105,7 @@ class LLPanelObjectInventory : public LLPanel, public LLVOInventoryListener
LLFolderView* mFolders; LLFolderView* mFolders;
LLUUID mTaskUUID; LLUUID mTaskUUID;
LLUUID mAttachmentUUID;
BOOL mHaveInventory; BOOL mHaveInventory;
BOOL mIsInventoryEmpty; BOOL mIsInventoryEmpty;
BOOL mInventoryNeedsUpdate; BOOL mInventoryNeedsUpdate;
......
...@@ -4416,6 +4416,9 @@ void LLSelectMgr::sendAttach(U8 attachment_point, bool replace) ...@@ -4416,6 +4416,9 @@ void LLSelectMgr::sendAttach(U8 attachment_point, bool replace)
SEND_ONLY_ROOTS ); SEND_ONLY_ROOTS );
if (!build_mode) if (!build_mode)
{ {
// After "ObjectAttach" server will unsubscribe us from properties updates
// so either deselect objects or resend selection after attach packet reaches server
// In case of build_mode LLPanelObjectInventory::refresh() will deal with selection
deselectAll(); deselectAll();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment