diff options
Diffstat (limited to 'indra/llui/llfloaterreg.cpp')
-rw-r--r-- | indra/llui/llfloaterreg.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 815260dff3..3c5a8a6921 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -36,6 +36,7 @@ #include "llfloater.h" #include "llmultifloater.h" +#include "llfloaterreglistener.h" //******************************************************* @@ -45,6 +46,8 @@ LLFloaterReg::instance_map_t LLFloaterReg::sInstanceMap; LLFloaterReg::build_map_t LLFloaterReg::sBuildMap; std::map<std::string,std::string> LLFloaterReg::sGroupMap; +static LLFloaterRegListener sFloaterRegListener("LLFloaterReg"); + //******************************************************* //static @@ -249,7 +252,7 @@ bool LLFloaterReg::hideInstance(const std::string& name, const LLSD& key) bool LLFloaterReg::toggleInstance(const std::string& name, const LLSD& key) { LLFloater* instance = findInstance(name, key); - if (instance && !instance->isMinimized() && instance->isInVisibleChain()) + if (LLFloater::isShown(instance)) { // When toggling *visibility*, close the host instead of the floater when hosted if (instance->getHost()) @@ -269,14 +272,7 @@ bool LLFloaterReg::toggleInstance(const std::string& name, const LLSD& key) bool LLFloaterReg::instanceVisible(const std::string& name, const LLSD& key) { LLFloater* instance = findInstance(name, key); - if (instance && !instance->isMinimized() && instance->isInVisibleChain()) - { - return true; - } - else - { - return false; - } + return LLFloater::isShown(instance); } //static |