projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove instances of finding a property before RegisterProperty
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
builder
/
builder-actor.cpp
diff --git
a/dali-toolkit/internal/builder/builder-actor.cpp
b/dali-toolkit/internal/builder/builder-actor.cpp
index
d8271e4
..
69bf0e6
100644
(file)
--- a/
dali-toolkit/internal/builder/builder-actor.cpp
+++ b/
dali-toolkit/internal/builder/builder-actor.cpp
@@
-18,7
+18,7
@@
// EXTERNAL INCLUDES
#include <string>
#include <dali/integration-api/debug.h>
// EXTERNAL INCLUDES
#include <string>
#include <dali/integration-api/debug.h>
-#include <dali/
public
-api/scripting/scripting.h>
+#include <dali/
devel
-api/scripting/scripting.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/builder/replacement.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/builder/replacement.h>
@@
-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.
// 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
-o
rigin") )
+ if( !IsVector3( child, "parent
O
rigin") )
{
{
- if( OptionalVector3 v =
IsVector3(child, "parent-origin"
) )
+ if( OptionalVector3 v =
constant.IsVector3( IsChild(child, "parentOrigin")
) )
{
actor.SetParentOrigin( *v );
}
{
actor.SetParentOrigin( *v );
}
- else if( OptionalString origin =
IsString(child, "parent-origin"
) )
+ else if( OptionalString origin =
constant.IsString( IsChild(child, "parentOrigin")
) )
{
actor.SetParentOrigin( GetAnchorConstant(*origin) );
}
}
{
actor.SetParentOrigin( GetAnchorConstant(*origin) );
}
}
- if( !IsVector3(child, "anchor
-p
oint") )
+ if( !IsVector3(child, "anchor
P
oint") )
{
{
- if( OptionalVector3 v =
IsVector3(child, "anchor-point"
) )
+ if( OptionalVector3 v =
constant.IsVector3( IsChild(child, "anchorPoint")
) )
{
actor.SetAnchorPoint( *v );
}
{
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
{
actor.SetAnchorPoint( GetAnchorConstant(*anchor) );
}
}
// Add custom properties
- if( OptionalChild customPropertiesChild = IsChild(child, "custom
-p
roperties") )
+ if( OptionalChild customPropertiesChild = IsChild(child, "custom
P
roperties") )
{
const TreeNode& customPropertiesNode = *customPropertiesChild;
const TreeConstIter endIter = customPropertiesNode.CEnd();
{
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 );
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 ))
{
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 );
}
}
}
}
}
}