#include <dali/internal/update/common/scene-graph-property-notification.h>
#include <dali/internal/event/common/thread-local-storage.h>
-using namespace std;
-
using Dali::Internal::SceneGraph::UpdateManager;
namespace Dali
void PropertyNotification::CreateSceneObject()
{
- DALI_ASSERT_DEBUG( mPropertyNotification == NULL );
-
- // Create a new PropertyNotification, temporarily owned
- SceneGraph::PropertyNotification* propertyNotification = SceneGraph::PropertyNotification::New( *mProxy,
- mProxyPropertyIndex,
- mPropertyType,
- mComponentIndex,
- GetImplementation(mCondition).type,
- mRawConditionArgs,
- mNotifyMode );
- // Keep a const pointer to the PropertyNotification.
- mPropertyNotification = propertyNotification;
-
- // Transfer scene object ownership to the update manager through a message
- AddPropertyNotificationMessage( mUpdateManager, propertyNotification );
+ // this method can be called from constructor and on stage connection
+ if( !mPropertyNotification )
+ {
+ // Create a new PropertyNotification, temporarily owned
+ SceneGraph::PropertyNotification* propertyNotification = SceneGraph::PropertyNotification::New( *mProxy,
+ mProxyPropertyIndex,
+ mPropertyType,
+ mComponentIndex,
+ GetImplementation(mCondition).type,
+ mRawConditionArgs,
+ mNotifyMode );
+ // Keep a const pointer to the PropertyNotification.
+ mPropertyNotification = propertyNotification;
+
+ // Transfer scene object ownership to the update manager through a message
+ AddPropertyNotificationMessage( mUpdateManager, propertyNotification );
+ }
}
void PropertyNotification::DestroySceneObject()