diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 4416708507356045b10684e329e94970a92b12bf..39f65058d3a82669651a82b01d7fec82fb610a66 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1855,8 +1855,6 @@ void LLFloater::onClickCloseBtn(bool app_quitting) // virtual void LLFloater::draw() { - const F32 alpha = getCurrentTransparency(); - // draw background if( isBackgroundVisible() ) { @@ -1884,6 +1882,7 @@ void LLFloater::draw() overlay_color = getTransparentImageOverlay(); } + const F32 alpha = getCurrentTransparency(); if (image) { // We're using images for this floater's backgrounds @@ -1976,19 +1975,18 @@ void LLFloater::drawShadow(LLPanel* panel) void LLFloater::updateTransparency(LLView* view, ETypeTransparency transparency_type) { - if (!view) return; - child_list_t children = *view->getChildList(); - child_list_t::iterator it = children.begin(); - - LLUICtrl* ctrl = dynamic_cast<LLUICtrl*>(view); - if (ctrl) + if (view) { - ctrl->setTransparencyType(transparency_type); - } + if (view->isCtrl()) + { + static_cast<LLUICtrl*>(view)->setTransparencyType(transparency_type); + } - for(; it != children.end(); ++it) - { - updateTransparency(*it, transparency_type); + for (LLView* pChild : *view->getChildList()) + { + if ((pChild->getChildCount()) || (pChild->isCtrl())) + updateTransparency(pChild, transparency_type); + } } } diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 00da0f5fec5075786163aecff9bffa7b0066fdbc..817ac559280eac391ef6dd20eaee9b6bdbe1f812 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -200,12 +200,10 @@ LLPanel::ctrl_list_t LLPanel::getCtrlList() const void LLPanel::draw() { - F32 alpha = getDrawContext().mAlpha; - // draw background if( mBgVisible ) { - alpha = getCurrentTransparency(); + F32 alpha = getCurrentTransparency(); LLRect local_rect = getLocalRect(); if (mBgOpaque )