TextModel - Create paragraph info for a given range of characters inside a text.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / builder / builder-actor.cpp
index d04e7e8..3807b08 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ namespace Internal
 {
 
 using namespace Dali::Scripting;
-extern bool SetPropertyFromNode( const TreeNode& node, Property::Value& value, const Replacement& constant );
+extern void DeterminePropertyFromNode( const TreeNode& node, Property::Value& value, const Replacement& constant );
 
 /*
  * Handles special case actor configuration (anything thats not already a property)
@@ -81,19 +81,10 @@ 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, Property::READ_WRITE );
-        }
-        else
-        {
-          actor.SetProperty( index, value );
-        }
-      }
+      DeterminePropertyFromNode( keyChild.second, value, constant );
+      // Register/Set property.
+      actor.RegisterProperty( key, value, Property::READ_WRITE );
     }
   }