diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-02 09:51:12 +0100 |
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-02 09:51:12 +0100 |
| commit | 9c715190ef9497212834452dbfd3c28856e7b044 (patch) | |
| tree | b9e479e36ce72ce80bc026749ae5f8328e520004 /indra/llui/llflatlistview.cpp | |
| parent | b1ae22c3eb71767219ebb96ec80011e10bbfabbe (diff) | |
| parent | 18d9efff12ef8b59c648a801fe2c5c7e0bc8fde4 (diff) | |
merge from viewer-trunk
Diffstat (limited to 'indra/llui/llflatlistview.cpp')
| -rw-r--r-- | indra/llui/llflatlistview.cpp | 25 |
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 |
