merge back beta fixes
commit
b50f23b899
1
.hgtags
1
.hgtags
|
|
@ -354,3 +354,4 @@ a8b3eca451a9eaab59987efb0ab1c4217e3f2dcc DRTVWR-182
|
|||
81f6b745ef27f5915fd07f988fdec9944f2bb73e DRTVWR-186
|
||||
cc953f00956be52cc64c30637bbeec310eea603f DRTVWR-181
|
||||
9ee9387789701d597130f879d9011a4958753862 DRTVWR-189
|
||||
421126293dcbde918e0da027ca0ab9deb5b4fbf2 DRTVWR-192
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -207,6 +207,8 @@ public:
|
|||
virtual void doDelete();
|
||||
virtual BOOL canDoDelete() const;
|
||||
|
||||
LLFolderViewItem* getNextUnselectedItem();
|
||||
|
||||
// Public rename functionality - can only start the process
|
||||
void startRenamingSelectedItem( void );
|
||||
|
||||
|
|
|
|||
|
|
@ -1098,6 +1098,10 @@ void LLFolderViewItem::draw()
|
|||
}
|
||||
}
|
||||
|
||||
bool LLFolderViewItem::isInSelection() const
|
||||
{
|
||||
return mIsSelected || (mParentFolder && mParentFolder->isInSelection());
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLFolderViewFolder
|
||||
|
|
|
|||
|
|
@ -243,6 +243,7 @@ public:
|
|||
virtual void destroyView();
|
||||
|
||||
BOOL isSelected() const { return mIsSelected; }
|
||||
bool isInSelection() const;
|
||||
|
||||
void setUnselected() { mIsSelected = FALSE; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1355,7 +1355,10 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
|
|||
else if ("cut" == action)
|
||||
{
|
||||
cutToClipboard();
|
||||
// MAINT-1197: This is temp code to work around a deselection/reselection bug. Please discard when merging CHUI.
|
||||
LLFolderViewItem* item_to_select = mRoot->getNextUnselectedItem();
|
||||
LLFolderView::removeCutItems();
|
||||
mRoot->setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, false);
|
||||
return;
|
||||
}
|
||||
else if ("copy" == action)
|
||||
|
|
@ -2743,7 +2746,10 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
|
|||
else if ("cut" == action)
|
||||
{
|
||||
cutToClipboard();
|
||||
// MAINT-1197: This is temp code to work around a deselection/reselection bug. Please discard when merging CHUI.
|
||||
LLFolderViewItem* item_to_select = mRoot->getNextUnselectedItem();
|
||||
LLFolderView::removeCutItems();
|
||||
mRoot->setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, false);
|
||||
return;
|
||||
}
|
||||
else if ("copy" == action)
|
||||
|
|
|
|||
Loading…
Reference in New Issue