diff options
author | andreykproductengine <akleshchev@productengine.com> | 2014-07-14 12:28:29 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2014-07-14 12:28:29 +0300 |
commit | 30c73d0f25bd7738c769fdba1ed947e1bfeb6ced (patch) | |
tree | 8d0ebb92beab9e72e94e71dff3d46f05f1a6e28a /indra | |
parent | 8f429fac242679cbbac8b6c33be0c593baac41c2 (diff) |
MAINT-4218 FIXED Adding clothing from inventory closes THAT clothing folder and hides THAT folder
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llfolderviewitem.cpp | 14 | ||||
-rwxr-xr-x | indra/newview/llfolderviewmodelinventory.cpp | 6 |
2 files changed, 14 insertions, 6 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 7213569487..9a14d0e419 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -970,8 +970,9 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) LL_RECORD_BLOCK_TIME(FTM_ARRANGE); // evaluate mHasVisibleChildren - mHasVisibleChildren = false; - if (getViewModelItem()->descendantsPassedFilter()) + bool default_filter = getRoot()->getFolderViewModel()->getFilter().isDefault(); + mHasVisibleChildren = default_filter && (mItems.size() || mFolders.size()); + if (!default_filter && getViewModelItem()->descendantsPassedFilter()) { // We have to verify that there's at least one child that's not filtered out bool found = false; @@ -1022,7 +1023,12 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) for(folders_t::iterator fit = mFolders.begin(); fit != mFolders.end(); ++fit) { LLFolderViewFolder* folderp = (*fit); - folderp->setVisible(folderp->passedFilter()); // passed filter or has descendants that passed filter + + // passedFilter() will show everything that passed filter or has descendants that passed filter + // also it will hide all filter-pending folders (they will be shown later if needed). + // but since refreshed folders are 'pending', they can be rendered invisible by passedFilter() + // even if we are not using filter at the moment, default_filter is used to prevent it + folderp->setVisible(default_filter || folderp->passedFilter()); if (folderp->getVisible()) { @@ -1041,7 +1047,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) iit != mItems.end(); ++iit) { LLFolderViewItem* itemp = (*iit); - itemp->setVisible(itemp->passedFilter()); + itemp->setVisible(default_filter || itemp->passedFilter()); if (itemp->getVisible()) { diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index 7339398fa5..11d49ff784 100755 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -129,13 +129,15 @@ void LLFolderViewModelItemInventory::requestSort() void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset, std::string::size_type string_size) { + bool init_state = getLastFilterGeneration() < 0; LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size); bool before = mPrevPassedAllFilters; mPrevPassedAllFilters = passedFilter(filter_generation); - if (before != mPrevPassedAllFilters) + if (before != mPrevPassedAllFilters || (init_state && before && !mFolderViewItem->getVisible())) { - // Need to rearrange the folder if the filtered state of the item changed + // Need to rearrange the folder if the filtered state of the item changed + // or folder was hidden during update as filter-dirty (MAINT-4218) LLFolderViewFolder* parent_folder = mFolderViewItem->getParentFolder(); if (parent_folder) { |