From 2a5c25cb3a47a319559aae6de1206e91b3c1647e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 17 Oct 2009 11:56:26 -0400 Subject: New LLFloater methods capture LLFloaterReg visibility tests. The logic was redundantly expressed in LLFloaterReg -- and would be useful elsewhere -- so was introduced as LLFloater::isShown(). Thanks to Richard and James for suggesting the terminology. --- indra/llui/llfloaterreg.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'indra/llui/llfloaterreg.cpp') diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 8617ba940e..589a34b2c8 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -247,7 +247,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()) @@ -267,14 +267,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 -- cgit v1.3