summaryrefslogtreecommitdiff
path: root/indra/llui/llflatlistview.cpp
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-04-01 12:52:04 -0700
committerRichard Nelson <none@none>2010-04-01 12:52:04 -0700
commit6cc65f9e5f0aba9242295d955eb31c4938b093e1 (patch)
tree43b41105ab1b95f0d63a85491417247f149a27de /indra/llui/llflatlistview.cpp
parent406b595e8c6811c2550340ba316328289d8b856f (diff)
parentdf45c16169bd2be38c53fd39fd87aa7b00bb64c2 (diff)
merge
Diffstat (limited to 'indra/llui/llflatlistview.cpp')
-rw-r--r--indra/llui/llflatlistview.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index d8084fd9aa..0fd7e7ed55 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,7 +782,12 @@ 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;
@@ -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