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/llfloater.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/llui/llfloater.cpp') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 66defbbf0a..d7a24192bb 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2605,3 +2605,13 @@ void LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr o moveResizeHandlesToFront(); } +bool LLFloater::isShown() const +{ + return ! isMinimized() && isInVisibleChain(); +} + +/* static */ +bool LLFloater::isShown(const LLFloater* floater) +{ + return floater && floater->isShown(); +} -- cgit v1.2.3