Merge "Fixed typo in BorderRenderer causing the overwriting of the cache's quad geome...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / image-view / image-view-impl.cpp
index 554469b..2cb24bb 100644 (file)
@@ -173,7 +173,7 @@ Vector3 ImageView::GetNaturalSize()
   size.y = mImageSize.GetHeight();
   size.z = std::min(size.x, size.y);
 
-  if( size.x > 0 && size.x > 0 )
+  if( size.x > 0 && size.y > 0 )
   {
     return size;
   }
@@ -215,6 +215,8 @@ float ImageView::GetWidthForHeight( float height )
 
 void ImageView::OnStageConnection( int depth )
 {
+  Control::OnStageConnection( depth );
+
   if( mRenderer )
   {
     CustomActor self = Self();
@@ -222,6 +224,18 @@ void ImageView::OnStageConnection( int depth )
   }
 }
 
+void ImageView::OnStageDisconnection()
+{
+  if( mRenderer )
+  {
+    CustomActor self = Self();
+    mRenderer.SetOffStage( self );
+  }
+
+  Control::OnStageDisconnection();
+}
+
+
 ///////////////////////////////////////////////////////////
 //
 // Properties