[NUI] correct logical operator in enum validation (#2045)
authorYeongJong Lee <cleanlyj@naver.com>
Wed, 23 Sep 2020 07:47:32 +0000 (16:47 +0900)
committerGitHub <noreply@github.com>
Wed, 23 Sep 2020 07:47:32 +0000 (16:47 +0900)
Test Code:
```cs
FlexLayout flexLayout = new FlexLayout();
flexLayout.WrapType = FlexLayout.FlexWrapType.Wrap;
```

Co-authored-by: Yeongjong Lee <yj34.lee@samsung.com>
src/Tizen.NUI/src/public/Layouting/FlexLayout.cs
src/Tizen.NUI/src/public/Layouting/GridLayout.cs

index bd5ea21..ae9a60a 100755 (executable)
@@ -383,7 +383,7 @@ namespace Tizen.NUI
             get => (FlexWrapType)Interop.FlexLayout.FlexLayout_GetFlexWrap(swigCPtr);
             set
             {
-                if (value != FlexWrapType.NoWrap || value != FlexWrapType.Wrap)
+                if (value != FlexWrapType.NoWrap && value != FlexWrapType.Wrap)
                     throw new InvalidEnumArgumentException(nameof(WrapType));
 
                 Interop.FlexLayout.FlexLayout_SetFlexWrap(swigCPtr, (int)value);
index fc10d60..4928d73 100755 (executable)
@@ -236,7 +236,7 @@ namespace Tizen.NUI
             set
             {
                 if (gridOrientation == value) return;
-                if (value != Orientation.Horizontal || value != Orientation.Vertical)
+                if (value != Orientation.Horizontal && value != Orientation.Vertical)
                     throw new InvalidEnumArgumentException(nameof(GridOrientation));
 
                 gridOrientation = value;