diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 7fbfd80d8da65665cdf294d0bad93e6986a8a2e0..43e5f6b051d4f344c7e65f91a2fabc6bc67ab4dc 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -315,12 +315,12 @@ void LLFocusMgr::removeKeyboardFocusWithoutCallback( const LLFocusableElement* f } } -bool LLFocusMgr::keyboardFocusHasMenus() const +bool LLFocusMgr::keyboardFocusHasAccelerators() const { LLView* focus_view = dynamic_cast<LLView*>(mKeyboardFocus); while( focus_view ) { - if(focus_view->hasMenus()) + if(focus_view->hasAccelerators()) { return true; } diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index e09bad0187d6bef170f551ee61f7cec5515bf533..22c1895075e70b8a5e1f5ee9d94841c79b507064 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -118,7 +118,7 @@ class LLFocusMgr void unlockFocus(); BOOL focusLocked() const { return mLockedView != NULL; } - bool keyboardFocusHasMenus() const; + bool keyboardFocusHasAccelerators() const; private: LLUICtrl* mLockedView; diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 706858e65caa64f7ff62423f35b8a3db6fb29854..33d345beff50bb9329fa00996e1b010c9c17889e 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -273,10 +273,10 @@ class LLView : public LLMouseHandler, public LLMortician, public LLFocusableElem BOOL focusNextRoot(); BOOL focusPrevRoot(); - // Normally we want the app menus to get priority on modified keys - // However, if this item claims to have menus then we want to give - // it first chance at handling them. (eg. the script editor) - virtual bool hasMenus() const { return false; }; + // Normally we want the app menus to get priority on accelerated keys + // However, sometimes we want to give specific views a first chance + // iat handling them. (eg. the script editor) + virtual bool hasAccelerators() const { return false; }; // delete all children. Override this function if you need to // perform any extra clean up such as cached pointers to selected diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 3207da4e00fc2f2e2c68551779537ecc8f1b27d4..f4b31e5962f5a4b5926c661ec058f7829ad70855 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -87,7 +87,7 @@ class LLScriptEdCore : public LLPanel static void onBtnInsertSample(void*); static void onBtnInsertFunction(LLUICtrl*, void*); - virtual bool hasMenus() const { return true; } + virtual bool hasAccelerators() const { return true; } private: void onBtnHelp(); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index dbc9317613493c5597c8d821bd87094cb992162d..983a2d25c810b65494fc3759eec73fdbc2320232 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2143,7 +2143,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) if (mask & (MASK_CONTROL | MASK_ALT) && !gFocusMgr.focusLocked()) { // Check the current floater's menu first, if it has one. - if (gFocusMgr.keyboardFocusHasMenus() + if (gFocusMgr.keyboardFocusHasAccelerators() && keyboard_focus && keyboard_focus->handleKey(key,mask,FALSE)) {