From b63780e28febeb52a96f76a524e2a9d99ad6759a Mon Sep 17 00:00:00 2001 From: "huayong.xu" Date: Wed, 21 Jun 2023 16:58:16 +0800 Subject: [PATCH] [NUI][API10] Fix a SVACE issue. --- src/Tizen.NUI/src/internal/Layouting/LayoutController.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs index 4373ee1..f02a294 100755 --- a/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs @@ -225,7 +225,7 @@ namespace Tizen.NUI // Parent not a View so assume it's a Layer which is the size of the window. private void MeasureAndLayout(View root, float parentWidth, float parentHeight) { - if (root.Layout != null) + if (root.Layout is var rootLayout && rootLayout != null) { // Determine measure specification for root. // The root layout policy could be an exact size, be match parent or wrap children. @@ -237,7 +237,7 @@ namespace Tizen.NUI var widthMode = GetMode(root.WidthSpecification); var heightMode = GetMode(root.HeightSpecification); - if (root.Layout.NeedsLayout(widthSize, heightSize, widthMode, heightMode)) + if (rootLayout.NeedsLayout(widthSize, heightSize, widthMode, heightMode)) { var widthSpec = CreateMeasureSpecification(widthSize, widthMode); var heightSpec = CreateMeasureSpecification(heightSize, heightMode); @@ -251,8 +251,8 @@ namespace Tizen.NUI // Start at root which was just measured. PerformLayout(root, new LayoutLength(positionX), new LayoutLength(positionY), - new LayoutLength(positionX) + root.Layout.MeasuredWidth.Size, - new LayoutLength(positionY) + root.Layout.MeasuredHeight.Size); + new LayoutLength(positionX) + rootLayout.MeasuredWidth.Size, + new LayoutLength(positionY) + rootLayout.MeasuredHeight.Size); } } -- 2.7.4