From: Heeyong Song Date: Tue, 25 Jun 2019 07:05:48 +0000 (+0900) Subject: Set size of a new visual in visual replacement case X-Git-Tag: dali_1.4.28~8 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=627f8ecadebd42a6678a8332a0c3e9704905687c 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 --- 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 edff0e3..06e823e 100755 --- a/dali-toolkit/internal/controls/image-view/image-view-impl.cpp +++ b/dali-toolkit/internal/controls/image-view/image-view-impl.cpp @@ -349,6 +349,14 @@ void ImageView::OnRelayout( const Vector2& size, RelayoutContainer& container ) 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 ); + } } }