summaryrefslogtreecommitdiff
path: root/indra/llui/llflatlistview.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-04-02 12:32:56 -0400
committerLoren Shih <seraph@lindenlab.com>2010-04-02 12:32:56 -0400
commit873de2daae04a63c796661ff6d4db6aa912041bf (patch)
tree1e44c8c87fc8c86013a8843c572ec6fac4409eab /indra/llui/llflatlistview.cpp
parent580ecaefcac2eb928c3dbdc9240e3fb54f3c989f (diff)
parenta7085418df1ada6e19b94b6df772ed21e663d119 (diff)
automated merge
Diffstat (limited to 'indra/llui/llflatlistview.cpp')
-rw-r--r--indra/llui/llflatlistview.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index d8084fd9aa..35f5a6bbb9 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -558,14 +558,6 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)
}
break;
}
- case 'A':
- {
- if(MASK_CONTROL & mask)
- {
- handled = (BOOL)selectAll();
- }
- break;
- }
default:
break;
}
@@ -790,10 +782,15 @@ bool LLFlatListView::selectNextItemPair(bool is_up_direction, bool reset_selecti
return false;
}
-bool LLFlatListView::selectAll()
+BOOL LLFlatListView::canSelectAll() const
+{
+ return !mItemPairs.empty() && mAllowSelection && mMultipleSelection;
+}
+
+void LLFlatListView::selectAll()
{
if (!mAllowSelection || !mMultipleSelection)
- return false;
+ return;
mSelectedItemPairs.clear();
@@ -813,8 +810,6 @@ bool LLFlatListView::selectAll()
// Stretch selected item rect to ensure it won't be clipped
mSelectedItemsBorder->setRect(getLastSelectedItemRect().stretch(-1));
-
- return true;
}
bool LLFlatListView::isSelected(item_pair_t* item_pair) const
@@ -952,11 +947,17 @@ void LLFlatListView::getValues(std::vector<LLSD>& values) const
void LLFlatListView::onFocusReceived()
{
mSelectedItemsBorder->setVisible(TRUE);
+ gEditMenuHandler = this;
}
// virtual
void LLFlatListView::onFocusLost()
{
mSelectedItemsBorder->setVisible(FALSE);
+ // Route menu back to the default
+ if( gEditMenuHandler == this )
+ {
+ gEditMenuHandler = NULL;
+ }
}
//virtual