diff options
author | Merov Linden <merov@lindenlab.com> | 2013-01-08 21:46:00 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-01-08 21:46:00 -0800 |
commit | 4ef1181cdcb03a08fbce8d774cd85ef914bef8f3 (patch) | |
tree | af16ae0b6f1f05fc72571b39ec1747ee095546c7 /indra/newview/llinventorypanel.cpp | |
parent | 0e7e877379b4ab0d8d8b7ae3ce8c9dfb91cc9de7 (diff) |
CHUI-659 : Fixed : Reimplemented open selection on hitting return the right way
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 81e7f166e1..25dc365467 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -684,8 +684,9 @@ void LLInventoryPanel::initializeViews() } else { - buildNewViews(gInventory.getRootFolderID()); - buildNewViews(gInventory.getLibraryRootFolderID()); + // Default case: always add "My Inventory" first, "Library" second + buildNewViews(gInventory.getRootFolderID()); // My Inventory + buildNewViews(gInventory.getLibraryRootFolderID()); // Library } gIdleCallbacks.addFunction(idle, this); @@ -1354,6 +1355,21 @@ void LLInventoryPanel::doToSelected(const LLSD& userdata) return; } +BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask ) +{ + BOOL handled = FALSE; + switch (key) + { + case KEY_RETURN: + // Open selected items if enter key hit on the inventory panel + if (mask == MASK_NONE) + { + LLInventoryAction::doToSelected(mInventory, mFolderRoot, "open"); + handled = TRUE; + } + } + return handled; +} /************************************************************************/ /* Recent Inventory Panel related class */ |