summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2016-01-15 13:36:38 -0800
committerRider Linden <rider@lindenlab.com>2016-01-15 13:36:38 -0800
commite7eaa94dfa1eba24cbf1667190a0be37b2f417e4 (patch)
tree9e9db05ef4d37698a7fa5f68149f724aa569528d /indra/newview/lltooldraganddrop.cpp
parent34fe371bfdeb6fc83818c58660c038c372c0f64a (diff)
parent5a5c023e291990a463b1a91846ce82c70da8daab (diff)
Merge VR
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rwxr-xr-xindra/newview/lltooldraganddrop.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 05c98826d2..98586e3b3d 100755
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -846,12 +846,12 @@ void LLToolDragAndDrop::dragOrDrop3D( S32 x, S32 y, MASK mask, BOOL drop, EAccep
if (mDrop)
{
// don't allow drag and drop onto transparent objects
- pick(gViewerWindow->pickImmediate(x, y, FALSE));
+ pick(gViewerWindow->pickImmediate(x, y, FALSE, FALSE));
}
else
{
// don't allow drag and drop onto transparent objects
- gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE);
+ gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, FALSE);
}
*acceptance = mLastAccept;
@@ -998,13 +998,10 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
// causing a dirty inventory) and we can do an update, stall the user
// while fetching the inventory.
//
- // Note: fetch only if inventory is both dirty and not present since previously checked faces
- // could have requested new fetch for same item (removed inventory and marked as dirty=false).
- // Objects without listeners (dirty==true and inventory!=NULL. In this specific case - before
- // first fetch) shouldn't be updated either since we won't receive any changes.
- if (hit_obj->isInventoryDirty() && hit_obj->getInventoryRoot() == NULL)
+ // Fetch if inventory is dirty and listener is present (otherwise we will not receive update)
+ if (hit_obj->isInventoryDirty() && hit_obj->hasInventoryListeners())
{
- hit_obj->fetchInventoryFromServer();
+ hit_obj->requestInventory();
LLSD args;
args["ERROR_MESSAGE"] = "Unable to add texture.\nPlease wait a few seconds and try again.";
LLNotificationsUtil::add("ErrorMessage", args);
@@ -1084,10 +1081,12 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
{
hit_obj->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, true);
}
- // Force the object to update its refetch its inventory so it has this texture.
- hit_obj->fetchInventoryFromServer();
- // TODO: Check to see if adding the item was successful; if not, then
- // we should return false here.
+ // Force the object to update and refetch its inventory so it has this texture.
+ hit_obj->dirtyInventory();
+ hit_obj->requestInventory();
+ // TODO: Check to see if adding the item was successful; if not, then
+ // we should return false here. This will requre a separate listener
+ // since without listener, we have no way to receive update
}
return TRUE;
}