[NUI] Remove wrong force casting, Layer as View (#2664)
authorEunki Hong <h.pichulia@gmail.com>
Fri, 19 Feb 2021 06:53:11 +0000 (15:53 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 25 Feb 2021 08:24:58 +0000 (17:24 +0900)
Remove force casting at LayoutItem.cs
just change Owner.GetParent() as View;
+
tiny typo error fix

Signed-off-by: pichulia <eunkiki.hong@samsung.com>
Co-authored-by: pichulia <eunkiki.hong@samsung.com>
Co-authored-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI/src/public/BaseComponents/View.cs
src/Tizen.NUI/src/public/Common/Position.cs
src/Tizen.NUI/src/public/Layouting/LayoutItem.cs

index 3917635..1e2be3a 100755 (executable)
@@ -1942,7 +1942,7 @@ namespace Tizen.NUI.BaseComponents
                 if (basehandle is Layer layer)
                 {
                     ret = new View(Layer.getCPtr(layer).Handle, false);
-                    NUILog.Error("This Parent property is deprecated, shoud do not be used");
+                    NUILog.Error("This Parent property is deprecated, should do not be used");
                 }
                 else
                 {
index 5f522d2..39cd6c8 100755 (executable)
@@ -339,7 +339,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// PivotPoint constants: 0.0.
+        /// PivotPoint constants: 0.5.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         public static float PivotPointMiddle
index 8bc25dc..64be1ab 100755 (executable)
@@ -573,10 +573,9 @@ namespace Tizen.NUI
                                                          " 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;
+                View ownerView = Owner.GetParent() as View;
 
-                if (onwerView != null && onwerView.Layout != null && onwerView.Layout.LayoutWithTransition)
+                if (ownerView != null && ownerView.Layout != null && ownerView.Layout.LayoutWithTransition)
                 {
                     NUIApplication.GetDefaultWindow().LayoutController.AddTransitionDataEntry(_layoutPositionData);
                 }