This patch redefines the method associated with visibility
to ensure that the latest text is displayed when
the text control gets visible
}
+void CtrlText::onUpdate( Subject<VarBool> &rVariable, void *arg )
+{
+ // Visibility changed
+ if( &rVariable == m_pVisible )
+ {
+ if( isVisible() )
+ {
+ displayText( m_rVariable.get() );
+ }
+ else
+ {
+ notifyLayout();
+ }
+ }
+}
+
+
void CtrlText::displayText( const UString &rText )
{
// Create the images ('normal' and 'double') from the text
/// Method called when the observed variable is modified
virtual void onUpdate( Subject<VarText> &rVariable, void* );
+ /// Method called when visibility is updated
+ virtual void onUpdate( Subject<VarBool> &rVariable , void* );
+
/// Display the text on the control
void displayText( const UString &rText );