summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-12-19 06:00:48 -0800
committerMerov Linden <merov@lindenlab.com>2014-12-19 06:00:48 -0800
commitb0f590f6ab4033503ff9d80e2374e374397d40fb (patch)
tree97e9758c011105b48218cbd2e611c51cc967520d /indra/newview/llinventorypanel.cpp
parentd0d5a6a15cf3c573c89ce590030c7a150b19dd05 (diff)
parent4ec9bce3c2a715f53938e4568c95b7a2bdfc9e16 (diff)
Pull merge from lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rwxr-xr-xindra/newview/llinventorypanel.cpp30
1 files changed, 10 insertions, 20 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 6926fa9268..86ff1aed1b 100755
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -548,12 +548,13 @@ void LLInventoryPanel::modelChanged(U32 mask)
// This item already exists in both memory and UI. It was probably reparented.
else if (model_item && view_item)
{
+ LLFolderViewFolder* old_parent = view_item->getParentFolder();
// Don't process the item if it is the root
- if (view_item->getParentFolder())
+ if (old_parent)
{
LLFolderViewFolder* new_parent = (LLFolderViewFolder*)getItemByID(model_item->getParentUUID());
// Item has been moved.
- if (view_item->getParentFolder() != new_parent)
+ if (old_parent != new_parent)
{
if (new_parent != NULL)
{
@@ -579,6 +580,7 @@ void LLInventoryPanel::modelChanged(U32 mask)
// doesn't include trash). Just remove the item's UI.
view_item->destroyView();
}
+ old_parent->getViewModelItem()->dirtyDescendantsFilter();
}
}
}
@@ -589,28 +591,16 @@ void LLInventoryPanel::modelChanged(U32 mask)
else if (!model_item && view_item && viewmodel_item)
{
// Remove the item's UI.
- const LLUUID& idp = viewmodel_item->getUUID();
- removeItemID(idp);
+ LLFolderViewFolder* parent = view_item->getParentFolder();
+ removeItemID(viewmodel_item->getUUID());
view_item->destroyView();
+ if(parent)
+ {
+ parent->getViewModelItem()->dirtyDescendantsFilter();
+ }
}
}
}
-
- if (mask & (LLInventoryObserver::STRUCTURE | LLInventoryObserver::REMOVE))
- {
- // STRUCTURE and REMOVE model changes usually fail to update (clean)
- // mMostFilteredDescendantGeneration of parent folder and dirtyFilter()
- // is not sufficient for successful filter update, so we need to check
- // all already passed element over again to remove obsolete elements.
- // New items or moved items should be sufficiently covered by
- // dirtyFilter().
- LLInventoryFilter& filter = getFilter();
- if (filter.getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE
- || filter.isNotDefault())
- {
- filter.setModified(LLFolderViewFilter::FILTER_MORE_RESTRICTIVE);
- }
- }
}
LLUUID LLInventoryPanel::getRootFolderID()