- const Property::Map& map = (*iter).entry;
- Dali::Property::Index index = handle.GetPropertyIndex( visualName );
- if( index != Property::INVALID_INDEX )
+ Property::Map map = (*iter).entry;
+ Property::Map* instancedMap = instancedProperties.Find( visualName );
+ ApplyVisual( handle, visualName, map, instancedMap );
+ }
+}
+
+void Style::ApplyVisual(
+ Handle handle,
+ const std::string& visualName,
+ const Property::Map& visualMap,
+ const Property::Map* instancedProperties )
+{
+ // Check if this visual name is a valid property of handle
+ Dali::Property::Index index = handle.GetPropertyIndex( visualName );
+ if( index != Property::INVALID_INDEX )
+ {
+ const Property::Map* applyMap = &visualMap;
+ Property::Map mergedMap;
+
+ // If there are instanced properties, and the visual types match,
+ // merge them into the visual map
+ if( instancedProperties )