Avoid several excessive per-frame LLView::getChildView calls by instead caching the results in postBuild. (Added CachedUICtrl, which is basically just a self-nulling pointer to not have to make ui ctors dirtier)

This commit is contained in:
Shyotl
2012-08-03 20:51:53 -05:00
parent ef601d3345
commit d2b13f515d
20 changed files with 210 additions and 99 deletions

View File

@@ -135,9 +135,9 @@ void LLFloaterChat::draw()
{
// enable say and shout only when text available
childSetValue("toggle_active_speakers_btn", childIsVisible("active_speakers_panel"));
mToggleActiveSpeakersBtn->setValue(mPanel->getVisible());
LLChatBar* chat_barp = getChild<LLChatBar>("chat_panel", TRUE);
LLChatBar* chat_barp = mChatPanel;
if (chat_barp)
{
chat_barp->refresh();
@@ -156,6 +156,9 @@ BOOL LLFloaterChat::postBuild()
{
chat_barp->setGestureCombo(getChild<LLComboBox>( "Gesture"));
}
mToggleActiveSpeakersBtn.connect(this,"toggle_active_speakers_btn");
mChatPanel.connect(this,"chat_panel");
return TRUE;
}