[NUI] Fix ScrollableBase Remove issue
authorhuiyu.eun <huiyu.eun@samsung.com>
Thu, 27 May 2021 05:44:35 +0000 (14:44 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Fri, 28 May 2021 03:54:42 +0000 (12:54 +0900)
 - [TDAF-1430] ScrollableaBase Child remove issue
 If the ScrollableBase has one child, it does not need to move the page

Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/Tizen.NUI.Components/Controls/ScrollableBase.cs

index e2798aa..2ea341b 100755 (executable)
@@ -725,7 +725,7 @@ namespace Tizen.NUI.Components
         /// <since_tizen> 8 </since_tizen>
         public override void Remove(View view)
         {
-            if (SnapToPage && CurrentPage == Children.IndexOf(view) && CurrentPage == Children.Count - 1)
+            if (SnapToPage && CurrentPage == Children.IndexOf(view) && CurrentPage == Children.Count - 1 && Children.Count > 1)
             {
                 // Target View is current page and also last child.
                 // CurrentPage should be changed to previous page.