[Tizen] Restore behavior of Uploaded and LoadingFinished signal
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / image-view / image-view-impl.cpp
index 890312c..eba1085 100755 (executable)
@@ -233,6 +233,22 @@ void ImageView::SetDepthIndex( int depthIndex )
   }
 }
 
+void ImageView::OnStageConnection( int depth )
+{
+  if( mImage )
+  {
+    mImage.UploadedSignal().Emit( mImage );
+  }
+
+  Dali::ResourceImage resourceImage = Dali::ResourceImage::DownCast( mImage );
+  if( resourceImage )
+  {
+    resourceImage.LoadingFinishedSignal().Emit( resourceImage );
+  }
+
+  Control::OnStageConnection( depth ); // Enabled visuals will be put on stage
+}
+
 Vector3 ImageView::GetNaturalSize()
 {
   if( mVisual )
@@ -463,9 +479,15 @@ Property::Value ImageView::GetProperty( BaseObject* object, Property::Index prop
           Scripting::CreatePropertyMap( impl.mImage, map );
           value = map;
         }
-        else if( !impl.mPropertyMap.Empty() )
+        else
         {
-          value = impl.mPropertyMap;
+          Property::Map map;
+          Toolkit::Visual::Base visual = DevelControl::GetVisual( impl, Toolkit::ImageView::Property::IMAGE );
+          if( visual )
+          {
+            visual.CreatePropertyMap( map );
+          }
+          value = map;
         }
         break;
       }