text controls were far from being optimized
- a notifyLayout was executed at creation of text control, leading
to rebuilding the layout twice.
- the init of the variable was done after the control was created
which means still more rebuild of the layout.
This patch ensures that no rebuild is done at init since we are already in the
process of rebuilding the entire layout.
if( isVisible() )
{
displayText( m_rVariable.get() );
+ notifyLayout( getPosition()->getWidth(), getPosition()->getHeight() );
}
}
if( isVisible() )
{
displayText( m_rVariable.get() );
+ notifyLayout( getPosition()->getWidth(), getPosition()->getHeight() );
}
else
{
m_pTimer->stop();
}
}
- notifyLayout( getPosition()->getWidth(), getPosition()->getHeight() );
}
}
VarText *pVar = new VarText( getIntf() );
m_pTheme->m_vars.push_back( VariablePtr( pVar ) );
+ // Set the text of the control
+ UString msg( getIntf(), rData.m_text.c_str() );
+ pVar->set( msg );
+
// Get the visibility variable
// XXX check when it is null
Interpreter *pInterpreter = Interpreter::instance( getIntf() );
pLayout->addControl( pText, pos, rData.m_layer );
- // Set the text of the control
- UString msg( getIntf(), rData.m_text.c_str() );
- pVar->set( msg );
}