From d73c6d84bfa054e2559a973c498d325f6ef57bf3 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Mon, 10 Oct 2011 10:20:13 -0500 Subject: [PATCH] Windlight floaters' isOpen() functions were always returning true after singleton was created, regardless of current visiblity status. Resulted in pointless syncMenu calls which are very expensive. --- indra/newview/llfloaterdaycycle.cpp | 2 +- indra/newview/llfloaterenvsettings.cpp | 2 +- indra/newview/llfloaterwater.cpp | 2 +- indra/newview/llfloaterwindlight.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/llfloaterdaycycle.cpp b/indra/newview/llfloaterdaycycle.cpp index 0799ca330..02ea83fb2 100644 --- a/indra/newview/llfloaterdaycycle.cpp +++ b/indra/newview/llfloaterdaycycle.cpp @@ -288,7 +288,7 @@ bool LLFloaterDayCycle::isOpen() { if (sDayCycle != NULL) { - return true; + return sDayCycle->getVisible(); } return false; } diff --git a/indra/newview/llfloaterenvsettings.cpp b/indra/newview/llfloaterenvsettings.cpp index 196cf92b7..e021e365c 100644 --- a/indra/newview/llfloaterenvsettings.cpp +++ b/indra/newview/llfloaterenvsettings.cpp @@ -197,7 +197,7 @@ bool LLFloaterEnvSettings::isOpen() { if (sEnvSettings != NULL) { - return true; + return sEnvSettings->getVisible(); } return false; } diff --git a/indra/newview/llfloaterwater.cpp b/indra/newview/llfloaterwater.cpp index e35d7e6c0..3b04f9387 100644 --- a/indra/newview/llfloaterwater.cpp +++ b/indra/newview/llfloaterwater.cpp @@ -316,7 +316,7 @@ void LLFloaterWater::show() bool LLFloaterWater::isOpen() { if (sWaterMenu != NULL) { - return true; + return sWaterMenu->getVisible(); } return false; } diff --git a/indra/newview/llfloaterwindlight.cpp b/indra/newview/llfloaterwindlight.cpp index dba360b88..9ec787a6c 100644 --- a/indra/newview/llfloaterwindlight.cpp +++ b/indra/newview/llfloaterwindlight.cpp @@ -473,7 +473,7 @@ void LLFloaterWindLight::show() bool LLFloaterWindLight::isOpen() { if (sWindLight != NULL) { - return true; + return sWindLight->getVisible(); } return false; }