From 3483f9e0d04f7a956921b9ac60e85b4371f97322 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 3 Nov 2009 17:40:26 +0200 Subject: Fixed major bug EXT-2098 (Unable to delete landmarks) The reason of this bug is that moved (removed to trash) Inventory Item exists in Panel which has no Trash folder in View hierarchy (Favorites & Landmarks accordions). I have updated LLInventoryPanel::modelChanged for case Inventory structure is changed: - added condition to verify if moved item is in Inventory Panel having content of some Inventory Folder and is not moved into the same folder. In this case appropriate View is removed from the Panel hierarchy. --HG-- branch : product-engine --- indra/newview/llfloaterinventory.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra') diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp index a47916b7d7..274c2234de 100644 --- a/indra/newview/llfloaterinventory.cpp +++ b/indra/newview/llfloaterinventory.cpp @@ -1447,6 +1447,19 @@ void LLInventoryPanel::modelChanged(U32 mask) view_item->getParentFolder()->extractItem(view_item); view_item->addToFolder(new_parent, mFolders); } +/* + on the other side in case Inventory Panel has content of the any folder + it is possible that item moved to some folder which is absent in current + Panel. For ex. removing item (via moving to trash). + In this case we need to check if new parent is other then inventory start folder + and simply remove its View from the hierarchy. + See details in EXT-2098. +*/ + // So, let check if item was moved into folder out of this Inventory Panel. + else if (mStartFolderID.notNull() && NULL == new_parent && model_item->getParentUUID() != mStartFolderID) + { + view_item->getParentFolder()->extractItem(view_item); + } } } else -- cgit v1.2.3