diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2012-08-21 18:10:45 +0300 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2012-08-21 18:10:45 +0300 |
commit | 4b44be799a578b946e440a4bc90aca0610734003 (patch) | |
tree | c63709aedf81523cd53bcfc9b15b32cdb36edce3 /indra/newview | |
parent | 00346422b6554e0b982973e6f8f05f0335b99852 (diff) |
MAINT-1416 FIXED Close Mini-map floater after Ctrl-W if it's opened and other floaters are not in focus
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloatermap.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llfloatermap.h | 1 | ||||
-rw-r--r-- | indra/newview/llviewermenufile.cpp | 9 |
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; } }; |