[NUI] Modify popup dismiss bug (#2335)
authorhuiyueun <35286162+huiyueun@users.noreply.github.com>
Mon, 7 Dec 2020 05:42:52 +0000 (14:42 +0900)
committerGitHub <noreply@github.com>
Mon, 7 Dec 2020 05:42:52 +0000 (14:42 +0900)
when dismiss popup, the shadow does not disappear.
-An error occurs after changing the parent to GetParent ().
-layer of converting View is null.

Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/Tizen.NUI/src/public/Layouting/LayoutItem.cs

index 1c7c2c2..cddda5e 100755 (executable)
@@ -551,9 +551,10 @@ namespace Tizen.NUI
                                                          " top:" + _layoutPositionData.Top +
                                                          " right:" + _layoutPositionData.Right +
                                                          " bottom:" + _layoutPositionData.Bottom );
+                Container onwerContainer = Owner.GetParent();
+                View onwerView = onwerContainer is Layer ? new View(Layer.getCPtr(onwerContainer).Handle, false) : onwerContainer as View;
 
-                var ownerParent = Owner.GetParent() as View;
-                if (ownerParent != null && ownerParent.Layout != null && ownerParent.Layout.LayoutWithTransition)
+                if (onwerView != null && onwerView.Layout != null && onwerView.Layout.LayoutWithTransition)
                 {
                     NUIApplication.GetDefaultWindow().LayoutController.AddTransitionDataEntry(_layoutPositionData);
                 }