summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-15 16:48:41 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-15 16:48:41 +0000
commited116da1311b281bcd815d9d3f95c1aecf67207d (patch)
tree71179644668ccecb78415cf352efee9063d47b97 /indra/newview
parent7c640406dd3753aecd0be157a12539b7f06644ef (diff)
DEV-33767 VWR-13897: Deleting multiple open animations crashes the viewer
We were closing preview floaters while we were in the middle of assembling the MoveInventoryItem message. But closing an anim preview floater issues a AgentAnimation message to stop any playing animation previews. On resuming the MoveInventoryItem assembly, message system is in a rightly confused state. Made preview window closing happen before we start assembling the MoveInventoryItem message.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinventorybridge.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index ec2be0e8e9..5b59f52fa5 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -293,12 +293,27 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*
LLMessageSystem* msg = gMessageSystem;
const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
LLViewerInventoryItem* item = NULL;
- LLViewerInventoryCategory* cat = NULL;
std::vector<LLUUID> move_ids;
LLInventoryModel::update_map_t update;
bool start_new_message = true;
S32 count = batch.count();
S32 i;
+
+ // first, hide any 'preview' floaters that correspond to the items
+ // being deleted.
+ for(i = 0; i < count; ++i)
+ {
+ bridge = (LLInvFVBridge*)(batch.get(i));
+ if(!bridge || !bridge->isItemRemovable()) continue;
+ item = (LLViewerInventoryItem*)model->getItem(bridge->getUUID());
+ if(item)
+ {
+ LLPreview::hide(item->getUUID());
+ }
+ }
+
+ // do the inventory move to trash
+
for(i = 0; i < count; ++i)
{
bridge = (LLInvFVBridge*)(batch.get(i));
@@ -308,7 +323,6 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*
{
if(item->getParentUUID() == trash_id) continue;
move_ids.push_back(item->getUUID());
- LLPreview::hide(item->getUUID());
--update[item->getParentUUID()];
++update[trash_id];
if(start_new_message)
@@ -340,11 +354,12 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*
gInventory.accountForUpdate(update);
update.clear();
}
+
for(i = 0; i < count; ++i)
{
bridge = (LLInvFVBridge*)(batch.get(i));
if(!bridge || !bridge->isItemRemovable()) continue;
- cat = (LLViewerInventoryCategory*)model->getCategory(bridge->getUUID());
+ LLViewerInventoryCategory* cat = (LLViewerInventoryCategory*)model->getCategory(bridge->getUUID());
if(cat)
{
if(cat->getParentUUID() == trash_id) continue;