[dali_1.0.37] Merge branch 'tizen'
[platform/core/uifw/dali-core.git] / dali / internal / update / common / property-owner.cpp
index 19389b8..e231f0a 100644 (file)
@@ -87,6 +87,16 @@ void PropertyOwner::Destroy()
   mConstraints.Clear();
 }
 
+void PropertyOwner::ConnectToSceneGraph()
+{
+  // Notification for observers
+  const ConstObserverIter endIter = mObservers.End();
+  for( ConstObserverIter iter = mObservers.Begin(); iter != endIter; ++iter)
+  {
+    (*iter)->PropertyOwnerConnected( *this );
+  }
+}
+
 void PropertyOwner::DisconnectFromSceneGraph( BufferIndex updateBufferIndex )
 {
   // Notification for observers
@@ -96,9 +106,6 @@ void PropertyOwner::DisconnectFromSceneGraph( BufferIndex updateBufferIndex )
     (*iter)->PropertyOwnerDisconnected( updateBufferIndex, *this );
   }
 
-  // Clear observers as they are not interested in destroyed if they have received a disconnect
-  mObservers.Clear();
-
   // Remove all constraints when disconnected from scene-graph
   mConstraints.Clear();
 }
@@ -119,13 +126,6 @@ void PropertyOwner::ResetToBaseValues( BufferIndex updateBufferIndex )
     (*iter)->ResetToBaseValue( updateBufferIndex );
   }
 
-  // Reset constraint weights
-  const ConstraintIter constraintEndIter = mConstraints.End();
-  for( ConstraintIter iter = mConstraints.Begin(); constraintEndIter != iter; ++iter )
-  {
-    (*iter)->mWeight.ResetToBaseValue( updateBufferIndex );
-  }
-
   // Notification for derived classes, to reset default properties
   ResetDefaultProperties( updateBufferIndex );
 }
@@ -144,7 +144,6 @@ void PropertyOwner::ApplyConstraint( ConstraintBase* constraint )
 
 void PropertyOwner::RemoveConstraint( ConstraintBase* constraint )
 {
-  // Reset constraint weights
   const ConstraintIter constraintEndIter = mConstraints.End();
   for( ConstraintIter iter = mConstraints.Begin(); constraintEndIter != iter; ++iter )
   {