diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-09-05 15:36:32 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-09-05 15:36:32 -0400 |
commit | 0621810ab1060e615f7464b0b4d1407a5abf144d (patch) | |
tree | db461db24d4bcae9293d6167edb49955feb41bb1 /indra/newview/llviewermenufile.cpp | |
parent | deddf0f3d97ed1ab6c8dc9f1592c5e4c4a4a273a (diff) | |
parent | c053dbe02c301b92c151eb835f6c770b61a46859 (diff) |
merge
Diffstat (limited to 'indra/newview/llviewermenufile.cpp')
-rwxr-xr-x | indra/newview/llviewermenufile.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 80f47ecab2..b2a37694fe 100755 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -477,8 +477,10 @@ class LLFileEnableCloseWindow : public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool new_value = NULL != gFloaterView->getFrontmostClosableFloater(); - return new_value; + bool frontmost_fl_exists = (NULL != gFloaterView->getFrontmostClosableFloater()); + bool frontmost_snapshot_fl_exists = (NULL != gSnapshotFloaterView->getFrontmostClosableFloater()); + + return frontmost_fl_exists || frontmost_snapshot_fl_exists; } }; @@ -486,7 +488,21 @@ class LLFileCloseWindow : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLFloater::closeFrontmostFloater(); + bool frontmost_fl_exists = (NULL != gFloaterView->getFrontmostClosableFloater()); + LLFloater* snapshot_floater = gSnapshotFloaterView->getFrontmostClosableFloater(); + + if(snapshot_floater && (!frontmost_fl_exists || snapshot_floater->hasFocus())) + { + snapshot_floater->closeFloater(); + if (gFocusMgr.getKeyboardFocus() == NULL) + { + gFloaterView->focusFrontFloater(); + } + } + else + { + LLFloater::closeFrontmostFloater(); + } return true; } }; |