summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2014-05-15 12:10:31 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2014-05-15 12:10:31 +0300
commitb392a8b659a3cd219918b29b06000d43767a6c7a (patch)
treecc3b9cbf39435c4212147812c784a395eaaec8d8 /indra/newview
parent98ad974a8eb3a9d5074beb80c5ce7c27a52c8fd2 (diff)
MAINT-4022 FIXED Use gSnapshotFloaterView to close snapshot floater, and then pass focus on to normal floater view.
Diffstat (limited to 'indra/newview')
-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 04697f3472..9880ebf2db 100755
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -476,8 +476,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;
}
};
@@ -485,7 +487,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;
}
};