[Tizen] FixBackgroundImageIssue 38/299138/2
authorseungho baek <sbsh.baek@samsung.com>
Wed, 20 Sep 2023 11:08:13 +0000 (20:08 +0900)
committerseungho baek <sbsh.baek@samsung.com>
Wed, 20 Sep 2023 11:25:02 +0000 (20:25 +0900)
Change-Id: I74d8daf53b2afb3771c1ea2faeaab16aadf5762d
Signed-off-by: seungho baek <sbsh.baek@samsung.com>
dali-toolkit/internal/controls/control/control-data-impl.cpp

index e7324e5..27f0e59 100755 (executable)
@@ -956,16 +956,18 @@ void Control::Impl::SetProperty( BaseObject* object, Property::Index index, cons
         const Property::Map* map = value.GetMap();
         if( map && !map->Empty() )
         {
-          controlImpl.SetBackground( *map );
+          Property::Map newMap;
+          newMap[Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING] = true;
+          newMap.Merge(*map);
+          controlImpl.SetBackground( newMap );
         }
         else if( value.Get( url ) )
         {
           // don't know the size to load
-          Toolkit::Visual::Base visual = Toolkit::VisualFactory::Get().CreateVisual( url, ImageDimensions() );
-          if( visual )
-          {
-            controlImpl.mImpl->RegisterVisual( Toolkit::Control::Property::BACKGROUND, visual, DepthIndex::BACKGROUND );
-          }
+          Property::Map map;
+          map[Toolkit::ImageVisual::Property::URL] = url;
+          map[Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING] = true;
+          controlImpl.SetBackground(map);
         }
         else if( value.Get( color ) )
         {