[NUI] remove needless null validation in LayoutItem.SetFrame (#2469)
authorYeongJong Lee <cleanlyj@naver.com>
Tue, 29 Dec 2020 02:54:02 +0000 (11:54 +0900)
committerhuiyueun <35286162+huiyueun@users.noreply.github.com>
Mon, 11 Jan 2021 05:49:43 +0000 (14:49 +0900)
src/Tizen.NUI/src/public/Layouting/LayoutItem.cs

index 4a83d70..fc2cb64 100755 (executable)
@@ -600,23 +600,20 @@ namespace Tizen.NUI
                 }
                 else
                 {
-                    if (Owner.Position != null)
+                    if (independent)
                     {
-                        if(independent)
-                        {
-                            // If height or width specification is not explicitly defined,
-                            // the size of the owner view must be reset even the ExcludeLayouting is true.
-                            if (Owner.HeightSpecification < 0 || Owner.WidthSpecification < 0)
-                            {
-                                Owner.SetSize(right - left, bottom - top);
-                            }
-                        }
-                        else
+                        // If height or width specification is not explicitly defined,
+                        // the size of the owner view must be reset even the ExcludeLayouting is true.
+                        if (Owner.HeightSpecification < 0 || Owner.WidthSpecification < 0)
                         {
                             Owner.SetSize(right - left, bottom - top);
-                            Owner.SetPosition(left, top);
                         }
                     }
+                    else
+                    {
+                        Owner.SetSize(right - left, bottom - top);
+                        Owner.SetPosition(left, top);
+                    }
                 }
 
                 // Reset condition for animation ready for next transition when required.