[NUI] Fix error if LottieAnimationView set BackgroundData before set URL
authorEunki, Hong <eunkiki.hong@samsung.com>
Thu, 15 Feb 2024 06:23:23 +0000 (15:23 +0900)
committerEunki Hong <h.pichulia@gmail.com>
Tue, 20 Feb 2024 09:33:15 +0000 (18:33 +0900)
Since LottieAnimationView.URL property change whole Visual property by itself,
CornerRadius / Borderline properties become ignored when we set URL.

To avoid this case, let we ensure to set CornerRadius / Borderline if we set URL

Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs

index 7ce0558..f280826 100755 (executable)
@@ -198,6 +198,18 @@ namespace Tizen.NUI.BaseComponents
 
                 Image = map;
 
+                if (backgroundExtraData != null)
+                {
+                    if (backgroundExtraData.CornerRadius != null)
+                    {
+                        UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.ContentsCornerRadius);
+                    }
+                    if (backgroundExtraData.BorderlineWidth > 0.0f)
+                    {
+                        UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.ContentsBorderline);
+                    }
+                }
+
                 // All states applied well.
                 currentStates.changed = false;