summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-03-27 22:39:31 -0400
committerNat Goodspeed <nat@lindenlab.com>2012-03-27 22:39:31 -0400
commitb7e0e44e3246299b639f787e3ab9b8e59cdc05c3 (patch)
tree475ea883c65a66f97d5db24a4c1041073e60a596 /indra/newview/llviewermessage.cpp
parentb8561da34d5d733670b6b1eabf483871ec6c18b0 (diff)
CHOP-854: Use new LLInventoryModel::removeObject() to discard offer.
Introduce new LLInventoryModel::removeCategory() method comparable to removeItem(), but for folder objects (using changeCategoryParent() rather than changeItemParent()). Introduce removeObject() method that calls one of the above, depending on runtime object type.
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rwxr-xr-xindra/newview/llviewermessage.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3c6770df43..ed5dd84586 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1064,7 +1064,9 @@ public:
// If we now try to remove the inventory item, it will cause a nested
// notifyObservers() call, which won't work.
// So defer moving the item to trash until viewer gets idle (in a moment).
- LLAppViewer::instance()->addOnIdleCallback(boost::bind(&LLInventoryModel::removeItem, &gInventory, mObjectID));
+ // Use removeObject() rather than removeItem() because at this level,
+ // the object could be either an item or a folder.
+ LLAppViewer::instance()->addOnIdleCallback(boost::bind(&LLInventoryModel::removeObject, &gInventory, mObjectID));
gInventory.removeObserver(this);
delete this;
}