Skip to content

Commit

Permalink
[NUI] Fix ScrollableBase Remove issue
Browse files Browse the repository at this point in the history
 - [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 <[email protected]>
  • Loading branch information
huiyueun authored and dongsug-song committed May 28, 2021
1 parent 9d0ed3e commit c5e7fa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tizen.NUI.Components/Controls/ScrollableBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ public override void Add(View view)
/// <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.
Expand Down

0 comments on commit c5e7fa1

Please sign in to comment.