[NUI] use correct max column/row count in validation of child column/row (#1831)
authorYeongJong Lee <cleanlyj@naver.com>
Wed, 15 Jul 2020 07:26:36 +0000 (16:26 +0900)
committerGitHub <noreply@github.com>
Wed, 15 Jul 2020 07:26:36 +0000 (16:26 +0900)
Column/row of GridLayout child should be compared to max column/row count which
is decided by auto-placement of GridLayout.

src/Tizen.NUI/src/internal/Layouting/GridLocations.cs

index 1809887..d0b90e9 100755 (executable)
@@ -176,12 +176,12 @@ namespace Tizen.NUI
                 verticalStretch = GetVerticalStretch(view);
                 horizontalStretch = GetHorizontalStretch(view);
 
-                if (column + columnSpan > Columns || row + rowSpan > Rows)
+                if (column + columnSpan > maxColumnConut || row + rowSpan > maxRowCount)
                 {
-                    if (column + columnSpan > Columns)
-                        Tizen.Log.Error("NUI", "Column + ColumnSapn exceeds Grid Columns. Column + ColumnSpan (" + column + " + " + columnSpan + ") > Grid Columns(" + Columns + ")");
+                    if (column + columnSpan > maxColumnConut)
+                        Tizen.Log.Error("NUI", "Column + ColumnSapn exceeds Grid Columns. Column + ColumnSpan (" + column + " + " + columnSpan + ") > Grid Columns(" + maxColumnConut + ")");
                     else
-                        Tizen.Log.Error("NUI", "Row + RowSapn exceeds Grid Rows. Row + RowSapn (" + row + " + " + rowSpan + ") > Grid Rows(" + Rows + ")");
+                        Tizen.Log.Error("NUI", "Row + RowSapn exceeds Grid Rows. Row + RowSapn (" + row + " + " + rowSpan + ") > Grid Rows(" + maxRowCount + ")");
 
                     gridChildren[i] = new GridChild(null, new Node(0, 1, 0, 0), new Node(0, 1, 0, 0));