(Builder) Ensure properties are not applied twice 74/26774/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 28 Aug 2014 10:05:54 +0000 (11:05 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 28 Aug 2014 14:26:39 +0000 (15:26 +0100)
[Problem]  Properties were being applied twice to each instance.
[Cause]    If an Actor instance is created we apply the style, which applies the style properties
           as well as the individual properties. After this the individual properties are applied
           again.
[Solution] Only apply the individual properties if the style properties have not been applied.

Change-Id: I39b8ad543b5cbb341e19bada25fb539797a1e3df

base/dali-toolkit/internal/builder/builder-impl.cpp

index 544c428..06e95e6 100644 (file)
@@ -507,9 +507,7 @@ BaseHandle Builder::DoCreate( const TreeNode& root, const TreeNode& node,
         }
       }
 
         }
       }
 
-      ApplyProperties( root, node, handle, replacements );
-
-      if( actor)
+      if( actor )
       {
         // add children of all the styles
         if( OptionalChild actors = IsChild( node, KEYNAME_ACTORS ) )
       {
         // add children of all the styles
         if( OptionalChild actors = IsChild( node, KEYNAME_ACTORS ) )
@@ -529,7 +527,10 @@ BaseHandle Builder::DoCreate( const TreeNode& root, const TreeNode& node,
           parent.Add( actor );
         }
       }
           parent.Add( actor );
         }
       }
-
+      else
+      {
+        ApplyProperties( root, node, handle, replacements );
+      }
     }
     else
     {
     }
     else
     {