summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index c8ff744369..2489bcbf04 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -3898,7 +3898,9 @@ void LLViewerWindow::updateKeyboardFocus()
LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
if (cur_focus)
{
- if (!cur_focus->isInVisibleChain() || !cur_focus->isInEnabledChain())
+ bool is_in_visible_chain = cur_focus->isInVisibleChain();
+ bool is_in_enabled_chain = cur_focus->isInEnabledChain();
+ if (!is_in_visible_chain || !is_in_enabled_chain)
{
// don't release focus, just reassign so that if being given
// to a sibling won't call onFocusLost on all the ancestors
@@ -3909,11 +3911,19 @@ void LLViewerWindow::updateKeyboardFocus()
bool new_focus_found = false;
while(parent)
{
+ if (!is_in_visible_chain)
+ {
+ is_in_visible_chain = parent->isInVisibleChain();
+ }
+ if (!is_in_enabled_chain)
+ {
+ is_in_enabled_chain = parent->isInEnabledChain();
+ }
if (parent->isCtrl()
&& (parent->hasTabStop() || parent == focus_root)
&& !parent->getIsChrome()
- && parent->isInVisibleChain()
- && parent->isInEnabledChain())
+ && is_in_visible_chain
+ && is_in_enabled_chain)
{
if (!parent->focusFirstItem())
{
@@ -5368,8 +5378,8 @@ bool LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
LLViewerCamera* camera = LLViewerCamera::getInstance();
LLViewerCamera saved_camera = LLViewerCamera::instance();
- glh::matrix4f saved_proj = get_current_projection();
- glh::matrix4f saved_mod = get_current_modelview();
+ glm::mat4 saved_proj = get_current_projection();
+ glm::mat4 saved_mod = get_current_modelview();
// camera constants for the square, cube map capture image
camera->setAspect(1.0); // must set aspect ratio first to avoid undesirable clamping of vertical FoV