diff options
| author | Aaron Terrell (Enus) <enus@lindenlab.com> | 2010-08-30 11:56:33 -0700 |
|---|---|---|
| committer | Aaron Terrell (Enus) <enus@lindenlab.com> | 2010-08-30 11:56:33 -0700 |
| commit | d04e8d757575dbb50877ef861adcfde427837bb6 (patch) | |
| tree | b214237a4246e523754b356b003d1d2a163f21ab /indra/llui/llflatlistview.cpp | |
| parent | 3172b4db1ee4d2059d2605ce616bdb10c840fc03 (diff) | |
| parent | d84c6625c707b5d61b71749b74f3cc4fb8f02048 (diff) | |
merging up from viewer-development
Diffstat (limited to 'indra/llui/llflatlistview.cpp')
| -rw-r--r-- | indra/llui/llflatlistview.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index b28399a36b..c57c02f4b1 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -607,8 +607,14 @@ void LLFlatListView::onItemMouseClick(item_pair_t* item_pair, MASK mask) return; } - if (!(mask & MASK_CONTROL) || !mMultipleSelection) resetSelection(); + //no need to do additional commit on selection reset + if (!(mask & MASK_CONTROL) || !mMultipleSelection) resetSelection(true); + + //only CTRL usage allows to deselect an item, usual clicking on an item cannot deselect it + if (mask & MASK_CONTROL) selectItemPair(item_pair, select_item); + else + selectItemPair(item_pair, true); } void LLFlatListView::onItemRightMouseClick(item_pair_t* item_pair, MASK mask) @@ -660,6 +666,14 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask) } break; } + case KEY_ESCAPE: + { + if (mask == MASK_NONE) + { + setFocus(FALSE); // pass focus to the game area (EXT-8357) + } + break; + } default: break; } @@ -775,6 +789,18 @@ bool LLFlatListView::selectItemPair(item_pair_t* item_pair, bool select) return true; } +void LLFlatListView::scrollToShowFirstSelectedItem() +{ + if (!mSelectedItemPairs.size()) return; + + LLRect selected_rc = mSelectedItemPairs.front()->first->getRect(); + + if (selected_rc.isValid()) + { + scrollToShowRect(selected_rc); + } +} + LLRect LLFlatListView::getLastSelectedItemRect() { if (!mSelectedItemPairs.size()) |
