From 0d9f0991bfa27afba6bfc1185dbe033c8eedee6b Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Tue, 12 Sep 2017 15:46:17 +0900 Subject: [PATCH] [Tizen] Restore behavior of Uploaded and LoadingFinished signal Change-Id: I00d146a24bab5ccafbad6771a7cd4d48962a9831 --- .../internal/controls/image-view/image-view-impl.cpp | 16 ++++++++++++++++ .../internal/controls/image-view/image-view-impl.h | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/dali-toolkit/internal/controls/image-view/image-view-impl.cpp b/dali-toolkit/internal/controls/image-view/image-view-impl.cpp index 72faf14..695eb89 100644 --- a/dali-toolkit/internal/controls/image-view/image-view-impl.cpp +++ b/dali-toolkit/internal/controls/image-view/image-view-impl.cpp @@ -174,6 +174,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 ) diff --git a/dali-toolkit/internal/controls/image-view/image-view-impl.h b/dali-toolkit/internal/controls/image-view/image-view-impl.h index f335ce7..f0418a1 100644 --- a/dali-toolkit/internal/controls/image-view/image-view-impl.h +++ b/dali-toolkit/internal/controls/image-view/image-view-impl.h @@ -128,6 +128,11 @@ private: // From Control void OnInitialize(); /** + * @copydoc CustomActorImpl::OnStageConnection() + */ + virtual void OnStageConnection( int depth ); + + /** * @copydoc Toolkit::Control::GetNaturalSize */ virtual Vector3 GetNaturalSize(); -- 2.7.4