- Property::Map textVisualProperties;
- GetImplementation( button ).MergeLabelProperties( *setPropertyMap, textVisualProperties );
- GetImplementation( button ).CreateVisualsForComponent( index, textVisualProperties, DepthIndex::CONTENT );
- GetImplementation( button ).RelayoutRequest();
+ DALI_LOG_INFO( gLogButtonFilter, Debug::Verbose, "Button::SetProperty Setting TextVisual with string[%s]\n", textString.c_str() );
+
+ Property::Map setPropertyMap;
+ setPropertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
+ .Add( Toolkit::TextVisual::Property::TEXT, textString );
+
+ GetImplementation( button ).MergeWithExistingLabelProperties( setPropertyMap, outTextVisualProperties );
+ }
+ else
+ {
+ // Get a Property::Map from the property if possible.
+ Property::Map* setPropertyMap = value.GetMap();
+ if( setPropertyMap )
+ {
+ TextVisual::ConvertStringKeysToIndexKeys( *setPropertyMap );
+ GetImplementation( button ).MergeWithExistingLabelProperties( *setPropertyMap, outTextVisualProperties );
+ }
+ }
+
+ if( !outTextVisualProperties.Empty() )
+ {
+ GetImplementation( button ).CreateVisualsForComponent( index, outTextVisualProperties, DepthIndex::CONTENT );