From 7ec107a04850d15a664827886a1c71b7a79b2aef Mon Sep 17 00:00:00 2001 From: YeongJong Lee Date: Tue, 29 Dec 2020 11:54:02 +0900 Subject: [PATCH] [NUI] remove needless null validation in LayoutItem.SetFrame (#2469) --- src/Tizen.NUI/src/public/Layouting/LayoutItem.cs | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/Tizen.NUI/src/public/Layouting/LayoutItem.cs b/src/Tizen.NUI/src/public/Layouting/LayoutItem.cs index 4a83d70..fc2cb64 100755 --- a/src/Tizen.NUI/src/public/Layouting/LayoutItem.cs +++ b/src/Tizen.NUI/src/public/Layouting/LayoutItem.cs @@ -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. -- 2.7.4