From 191da2db43b18c978627802509eecc8d7aac2dc7 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 5 Jul 2011 21:56:35 +0200 Subject: [PATCH] Check if visibility is different from current state for a floater (Should gain some performance as this method is called dozend times per second during UI update) --- indra/llui/llfloater.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 0ff8f0366b..8e60e7b293 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -600,6 +600,11 @@ LLControlGroup* LLFloater::getControlGroup() void LLFloater::setVisible( BOOL visible ) { + // Ansariel: This method is called everytime the UI updates. + // Why should we want to update visibility even + // if nothing has changed? + if (visible == LLPanel::getVisible()) return; + LLPanel::setVisible(visible); // calls handleVisibilityChange() if( visible && mFirstLook ) {