From b493edd2c32273b767d8bc3177b3b662947a5655 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 27 Apr 2016 18:06:57 +0300 Subject: MAINT-204 Fixed Top folder is expanded when my inventory filter is changed --- indra/llui/llfolderview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 3282c5f726..8166ef6a07 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1629,9 +1629,9 @@ void LLFolderView::update() if (mNeedsAutoSelect) { LL_RECORD_BLOCK_TIME(FTM_AUTO_SELECT); - // select new item only if a filtered item not currently selected + // select new item only if a filtered item not currently selected and there was a selection LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back(); - if (!mAutoSelectOverride && (!selected_itemp || !selected_itemp->getViewModelItem()->potentiallyVisible())) + if (!mAutoSelectOverride && selected_itemp && !selected_itemp->getViewModelItem()->potentiallyVisible()) { // these are named variables to get around gcc not binding non-const references to rvalues // and functor application is inherently non-const to allow for stateful functors -- cgit v1.2.3