X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fbuilder%2Fbuilder-actor.cpp;h=69bf0e6886d755512065c8ec2ddef9ebd5a8f902;hp=287663cedbef31056b5de2cd7eeeaae61ded1f81;hb=2c97b9f743493b56e6256fbce8ef5c3e2080572c;hpb=074b05f53f89491982b2d5380cab7f05b1932a76 diff --git a/dali-toolkit/internal/builder/builder-actor.cpp b/dali-toolkit/internal/builder/builder-actor.cpp index 287663c..69bf0e6 100644 --- a/dali-toolkit/internal/builder/builder-actor.cpp +++ b/dali-toolkit/internal/builder/builder-actor.cpp @@ -47,32 +47,32 @@ Actor SetupActor( const TreeNode& child, Actor& actor, const Replacement& consta // we allow enums strings for parent-origin and anchor-point but as with the current json // strings always succeed if they exist then check its not vector. If they are Vec3s then // this has already been set as a generic property. - if( !IsVector3( child, "parent-origin") ) + if( !IsVector3( child, "parentOrigin") ) { - if( OptionalVector3 v = IsVector3(child, "parent-origin") ) + if( OptionalVector3 v = constant.IsVector3( IsChild(child, "parentOrigin") ) ) { actor.SetParentOrigin( *v ); } - else if( OptionalString origin = IsString(child, "parent-origin") ) + else if( OptionalString origin = constant.IsString( IsChild(child, "parentOrigin") ) ) { actor.SetParentOrigin( GetAnchorConstant(*origin) ); } } - if( !IsVector3(child, "anchor-point") ) + if( !IsVector3(child, "anchorPoint") ) { - if( OptionalVector3 v = IsVector3(child, "anchor-point") ) + if( OptionalVector3 v = constant.IsVector3( IsChild(child, "anchorPoint") ) ) { actor.SetAnchorPoint( *v ); } - else if( OptionalString anchor = IsString(child, "anchor-point") ) + else if( OptionalString anchor = constant.IsString( IsChild(child, "anchorPoint") ) ) { actor.SetAnchorPoint( GetAnchorConstant(*anchor) ); } } // Add custom properties - if( OptionalChild customPropertiesChild = IsChild(child, "custom-properties") ) + if( OptionalChild customPropertiesChild = IsChild(child, "customProperties") ) { const TreeNode& customPropertiesNode = *customPropertiesChild; const TreeConstIter endIter = customPropertiesNode.CEnd(); @@ -81,18 +81,11 @@ Actor SetupActor( const TreeNode& child, Actor& actor, const Replacement& consta const TreeNode::KeyNodePair& keyChild = *iter; std::string key( keyChild.first ); - Property::Index index = actor.GetPropertyIndex( key ); Property::Value value; if( SetPropertyFromNode( keyChild.second, value, constant )) { - if( Property::INVALID_INDEX == index ) - { - actor.RegisterProperty( key, value ); - } - else - { - actor.SetProperty( index, value ); - } + // Register/Set property. + actor.RegisterProperty( key, value, Property::READ_WRITE ); } } }