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 9f7294b..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();
@@ -229,6 +231,8 @@ void ImageView::OnStageDisconnection()
     CustomActor self = Self();
     mRenderer.SetOffStage( self );
   }
+
+  Control::OnStageDisconnection();
 }