From c779e20b2fec80511d28620d7d2ab6279dfcd0cd Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Tue, 25 Jun 2019 16:05:48 +0900 Subject: [PATCH] [4.0] Set size of a new visual in visual replacement case mVisual is not updated util the resource is ready in the case of visual replacement. So apply the transform and size to the new visual. Change-Id: Ied60fd820978d1dcd03fee53b1b105cce750645d --- dali-toolkit/internal/controls/image-view/image-view-impl.cpp | 8 ++++++++ 1 file changed, 8 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 5f5cef5..702959d 100755 --- a/dali-toolkit/internal/controls/image-view/image-view-impl.cpp +++ b/dali-toolkit/internal/controls/image-view/image-view-impl.cpp @@ -320,6 +320,14 @@ void ImageView::OnRelayout( const Vector2& size, RelayoutContainer& container ) // Should provide a transform that handles aspect ratio according to image size mVisual.SetTransformAndSize( transformMap, size ); + + // mVisual is not updated util the resource is ready in the case of visual replacement. + // So apply the transform and size to the new visual. + Toolkit::Visual::Base visual = DevelControl::GetVisual( *this, Toolkit::ImageView::Property::IMAGE ); + if( visual && visual != mVisual ) + { + visual.SetTransformAndSize( transformMap, size ); + } } } -- 2.7.4