[Tizen] Fix to set synchronous loading property only for Image background 41/299141/2 accepted/tizen_6.0_unified accepted/tizen/6.0/unified/20231006.011240
authorseungho baek <sbsh.baek@samsung.com>
Wed, 20 Sep 2023 11:56:31 +0000 (20:56 +0900)
committerseungho baek <sbsh.baek@samsung.com>
Wed, 20 Sep 2023 12:00:07 +0000 (21:00 +0900)
Change-Id: Ie981890510fcac56d21c5badc9e60f5d481b8832
Signed-off-by: seungho baek <sbsh.baek@samsung.com>
dali-toolkit/internal/controls/control/control-data-impl.cpp

index 27f0e59..3207941 100755 (executable)
@@ -957,7 +957,11 @@ void Control::Impl::SetProperty( BaseObject* object, Property::Index index, cons
         if( map && !map->Empty() )
         {
           Property::Map newMap;
-          newMap[Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING] = true;
+          Property::Value* typeValue = map->Find(Toolkit::Visual::Property::TYPE);
+          if(typeValue && typeValue->Get<Toolkit::Visual::Type>() == Toolkit::Visual::IMAGE)
+          {
+            newMap[Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING] = true;
+          }
           newMap.Merge(*map);
           controlImpl.SetBackground( newMap );
         }
@@ -965,7 +969,8 @@ void Control::Impl::SetProperty( BaseObject* object, Property::Index index, cons
         {
           // don't know the size to load
           Property::Map map;
-          map[Toolkit::ImageVisual::Property::URL] = url;
+          map[Toolkit::Visual::Property::TYPE]                     = Toolkit::Visual::IMAGE;
+          map[Toolkit::ImageVisual::Property::URL]                 = url;
           map[Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING] = true;
           controlImpl.SetBackground(map);
         }