summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenufile.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2014-09-05 15:36:32 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2014-09-05 15:36:32 -0400
commit0621810ab1060e615f7464b0b4d1407a5abf144d (patch)
treedb461db24d4bcae9293d6167edb49955feb41bb1 /indra/newview/llviewermenufile.cpp
parentdeddf0f3d97ed1ab6c8dc9f1592c5e4c4a4a273a (diff)
parentc053dbe02c301b92c151eb835f6c770b61a46859 (diff)
merge
Diffstat (limited to 'indra/newview/llviewermenufile.cpp')
-rwxr-xr-xindra/newview/llviewermenufile.cpp22
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;
}
};