diff options
author | Kelly Washington <kelly@lindenlab.com> | 2010-09-24 15:57:17 -0700 |
---|---|---|
committer | Kelly Washington <kelly@lindenlab.com> | 2010-09-24 15:57:17 -0700 |
commit | 0931799f03df4a0d573cc9162f1a81f6e3222d3b (patch) | |
tree | 9838fe04bf3e6ee5a8e7cb6cfd33a23910bbafde /indra/newview/llviewerwindow.cpp | |
parent | b34856d66dfa1a725cb85d813982709566b6db7a (diff) |
VWR-21377 Script editor ctrl-f fix.
let some LLViews handle shortcut keys if they want.
reviewed with ambroff
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b2ff39bbd2..dbc9317613 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2136,10 +2136,20 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) return TRUE; } + LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus(); + // give menus a chance to handle modified (Ctrl, Alt) shortcut keys before current focus // as long as focus isn't locked if (mask & (MASK_CONTROL | MASK_ALT) && !gFocusMgr.focusLocked()) { + // Check the current floater's menu first, if it has one. + if (gFocusMgr.keyboardFocusHasMenus() + && keyboard_focus + && keyboard_focus->handleKey(key,mask,FALSE)) + { + return TRUE; + } + if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask)) ||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))) { @@ -2175,7 +2185,6 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) } // Traverses up the hierarchy - LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus(); if( keyboard_focus ) { LLLineEditor* chat_editor = LLBottomTray::instanceExists() ? LLBottomTray::getInstance()->getNearbyChatBar()->getChatBox() : NULL; |