From: Adeel Kazmi Date: Thu, 28 Aug 2014 10:05:54 +0000 (+0100) Subject: (Builder) Ensure properties are not applied twice X-Git-Tag: dali_1.0.8~14^2~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=f475f97211f494e2d2985639c4d2cffbdfea1f1c (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 --- 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 {