From f475f97211f494e2d2985639c4d2cffbdfea1f1c Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Thu, 28 Aug 2014 11:05:54 +0100 Subject: [PATCH] (Builder) Ensure properties are not applied twice [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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/base/dali-toolkit/internal/builder/builder-impl.cpp b/base/dali-toolkit/internal/builder/builder-impl.cpp index 544c428..06e95e6 100644 --- a/base/dali-toolkit/internal/builder/builder-impl.cpp +++ b/base/dali-toolkit/internal/builder/builder-impl.cpp @@ -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 ) ) @@ -529,7 +527,10 @@ BaseHandle Builder::DoCreate( const TreeNode& root, const TreeNode& node, parent.Add( actor ); } } - + else + { + ApplyProperties( root, node, handle, replacements ); + } } else { -- 2.7.4