From 7a45e6fd7716ede5cf7b5481542cde039de62509 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 28 Feb 2014 15:33:09 +0200 Subject: MAINT-358 FIXED [PUBLIC]Verbs buttons are available for landmarks folder if it was selected via keyboard --- indra/llui/llfolderview.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 13d231d712..173279fa81 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1127,18 +1127,18 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if((mSelectedItems.size() > 0) && mScrollContainer) { LLFolderViewItem* last_selected = getCurSelectedItem(); + BOOL shift_select = mask & MASK_SHIFT; + // don't shift select down to children of folders (they are implicitly selected through parent) + LLFolderViewItem* next = last_selected->getNextOpenNode(!shift_select); - if (!mKeyboardSelection) + if (!mKeyboardSelection || (!shift_select && (!next || next == last_selected))) { setSelection(last_selected, FALSE, TRUE); mKeyboardSelection = TRUE; } - LLFolderViewItem* next = NULL; - if (mask & MASK_SHIFT) + if (shift_select) { - // don't shift select down to children of folders (they are implicitly selected through parent) - next = last_selected->getNextOpenNode(FALSE); if (next) { if (next->isSelected()) @@ -1155,7 +1155,6 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) } else { - next = last_selected->getNextOpenNode(); if( next ) { if (next == last_selected) @@ -1191,18 +1190,18 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if((mSelectedItems.size() > 0) && mScrollContainer) { LLFolderViewItem* last_selected = mSelectedItems.back(); + BOOL shift_select = mask & MASK_SHIFT; + // don't shift select down to children of folders (they are implicitly selected through parent) + LLFolderViewItem* prev = prev = last_selected->getPreviousOpenNode(!shift_select); - if (!mKeyboardSelection) + if (!mKeyboardSelection || (!shift_select && prev == this)) { setSelection(last_selected, FALSE, TRUE); mKeyboardSelection = TRUE; } - LLFolderViewItem* prev = NULL; - if (mask & MASK_SHIFT) + if (shift_select) { - // don't shift select down to children of folders (they are implicitly selected through parent) - prev = last_selected->getPreviousOpenNode(FALSE); if (prev) { if (prev->isSelected()) @@ -1219,7 +1218,6 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) } else { - prev = last_selected->getPreviousOpenNode(); if( prev ) { if (prev == this) -- cgit v1.2.3 From 65850279964bed111e0d11b99f26867cd46b91b7 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 5 Mar 2014 12:25:52 +0200 Subject: fix build problem --- indra/llui/llfolderview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 173279fa81..c9ea0c0e1b 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1192,7 +1192,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) LLFolderViewItem* last_selected = mSelectedItems.back(); BOOL shift_select = mask & MASK_SHIFT; // don't shift select down to children of folders (they are implicitly selected through parent) - LLFolderViewItem* prev = prev = last_selected->getPreviousOpenNode(!shift_select); + LLFolderViewItem* prev = last_selected->getPreviousOpenNode(!shift_select); if (!mKeyboardSelection || (!shift_select && prev == this)) { -- cgit v1.2.3