[NUI] Fix Navigator Insert to keep pages order correctly
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Thu, 1 Dec 2022 07:48:39 +0000 (16:48 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Fri, 10 Mar 2023 07:00:48 +0000 (16:00 +0900)
Previously, pages order was not kept correctly when a page was inserted.
Because of that, inserted page overlaps the next page's page transition.
e.g.
- Let page1 be pushed.
- Let page2 be inserted before page1.
- Pop page1.
Then page1's page transition is hidden by page2 because page2 is added
later so page2 overlaps page1.

Now, to resolve the above issue, the order of the inserted page is
updated based on its page index value.

src/Tizen.NUI.Components/Controls/Navigation/Navigator.cs

index b0ccc7a..998ce03 100755 (executable)
@@ -592,6 +592,7 @@ namespace Tizen.NUI.Components
 
             navigationPages.Insert(index, page);
             Add(page);
+            page.SiblingOrder = index;
             page.Navigator = this;
             if (index == PageCount - 1)
             {