summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderview.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-08-14 08:50:23 -0400
committerOz Linden <oz@lindenlab.com>2012-08-14 08:50:23 -0400
commit9f6503a1fc1145e886cad0aaf9b964e32e6c5449 (patch)
tree051874a314d92664f73e478b7b4621c6c153b650 /indra/newview/llfolderview.cpp
parent2c2167229eac3efd7e7b1c5eafde8ee2e66184cd (diff)
parentf72c1d64c2f09cd1d8b003a61b6892b4c7686723 (diff)
merge changes for DRTVWR-192
Diffstat (limited to 'indra/newview/llfolderview.cpp')
-rw-r--r--indra/newview/llfolderview.cpp34
1 files changed, 24 insertions, 10 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 7d047ec67e..d4080ab3f7 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -2235,14 +2235,9 @@ void LLFolderView::doIdle()
arrangeAll();
}
- mNeedsAutoSelect = mFilter->hasFilterString() &&
- !(gFocusMgr.childHasKeyboardFocus(this) || gFocusMgr.getMouseCapture());
-
-
- if (mFilter->isModified() && mFilter->isNotDefault())
- {
- mNeedsAutoSelect = TRUE;
- }
+ BOOL filter_modified_and_active = mFilter->isModified() && mFilter->isNotDefault();
+ mNeedsAutoSelect = filter_modified_and_active &&
+ !(gFocusMgr.childHasKeyboardFocus(this) || gFocusMgr.getMouseCapture());
mFilter->clearModified();
// filter to determine visibility before arranging
@@ -2254,7 +2249,7 @@ void LLFolderView::doIdle()
LLFastTimer t3(FTM_AUTO_SELECT);
// select new item only if a filtered item not currently selected
LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back();
- if (!mAutoSelectOverride && (!selected_itemp || !selected_itemp->potentiallyFiltered()))
+ if (!mAutoSelectOverride && (!selected_itemp || !selected_itemp->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
@@ -2264,7 +2259,7 @@ void LLFolderView::doIdle()
// Open filtered folders for folder views with mAutoSelectOverride=TRUE.
// Used by LLPlacesFolderView.
- if (mAutoSelectOverride && !mFilter->getFilterSubString().empty())
+ if (!mFilter->getFilterSubString().empty())
{
// 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
@@ -2556,6 +2551,25 @@ void LLFolderView::onRenamerLost()
}
}
+LLFolderViewItem* LLFolderView::getNextUnselectedItem()
+{
+ LLFolderViewItem* last_item = *mSelectedItems.rbegin();
+ LLFolderViewItem* new_selection = last_item->getNextOpenNode(FALSE);
+ while(new_selection && new_selection->isSelected())
+ {
+ new_selection = new_selection->getNextOpenNode(FALSE);
+ }
+ if (!new_selection)
+ {
+ new_selection = last_item->getPreviousOpenNode(FALSE);
+ while (new_selection && (new_selection->isInSelection()))
+ {
+ new_selection = new_selection->getPreviousOpenNode(FALSE);
+ }
+ }
+ return new_selection;
+}
+
LLInventoryFilter* LLFolderView::getFilter()
{
return mFilter;