From: Sunghyun kim Date: Wed, 15 Jan 2020 09:27:23 +0000 (+0900) Subject: Change size for new visual using initialized transformMap when mVisual is not updated. X-Git-Tag: dali_1.9.17~4^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=16f3d4f2c1badd9be859725f6ea8154f58063c10;ds=inline Change size for new visual using initialized transformMap when mVisual is not updated. When the size was set for the new visual, there was an issue that the previous transformMap was set together. so in order to prevent this, The new visual has been changed to use the initialized map. Change-Id: I1ce1b735691e1b4963c3d4f3faf07d2c148ad478 --- 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 085d522..69c126c 100755 --- a/dali-toolkit/internal/controls/image-view/image-view-impl.cpp +++ b/dali-toolkit/internal/controls/image-view/image-view-impl.cpp @@ -274,11 +274,12 @@ 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. + // in this case, the Property Map must be initialized so that the previous value is not reused. + // after mVisual is updated, the correct value will be reset. Toolkit::Visual::Base visual = DevelControl::GetVisual( *this, Toolkit::ImageView::Property::IMAGE ); if( visual && visual != mVisual ) { - visual.SetTransformAndSize( transformMap, size ); + visual.SetTransformAndSize( Property::Map(), size ); } } }