summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatermap.cpp5
-rw-r--r--indra/newview/llfloatermap.h1
-rw-r--r--indra/newview/llviewermenufile.cpp9
3 files changed, 13 insertions, 2 deletions
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 539869a084..473e2938be 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -246,3 +246,8 @@ void LLFloaterMap::handleZoom(const LLSD& userdata)
mMap->setScale(scale);
}
}
+
+LLFloaterMap* LLFloaterMap::getInstance()
+{
+ return LLFloaterReg::getTypedInstance<LLFloaterMap>("mini_map");
+}
diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h
index 8a1b965e62..ff2fb20535 100644
--- a/indra/newview/llfloatermap.h
+++ b/indra/newview/llfloatermap.h
@@ -39,6 +39,7 @@ class LLFloaterMap : public LLFloater
{
public:
LLFloaterMap(const LLSD& key);
+ static LLFloaterMap* getInstance();
virtual ~LLFloaterMap();
/*virtual*/ BOOL postBuild();
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index f791d906e6..21a323941d 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -34,6 +34,7 @@
#include "llfilepicker.h"
#include "llfloaterreg.h"
#include "llbuycurrencyhtml.h"
+#include "llfloatermap.h"
#include "llfloatermodelpreview.h"
#include "llfloatersnapshot.h"
#include "llimage.h"
@@ -476,7 +477,7 @@ class LLFileEnableCloseWindow : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
bool new_value = NULL != LLFloater::getClosableFloaterFromFocus();
- return new_value;
+ return new_value || LLFloaterMap::getInstance()->isInVisibleChain();
}
};
@@ -484,8 +485,12 @@ class LLFileCloseWindow : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
+ bool new_value = (NULL == LLFloater::getClosableFloaterFromFocus());
+ if(new_value && LLFloaterMap::getInstance()->isInVisibleChain())
+ {
+ LLFloaterMap::getInstance()->closeFloater(false);
+ }
LLFloater::closeFocusedFloater();
-
return true;
}
};