@@ -139,6 +139,17 @@ AbstractButton {
141 onGoBackToParentClicked: {
141 onGoBackToParentClicked: {
142+ if (navigationListView.currentIndex == 0) {
143+ // This can happen if we jumped to the non root of a deep tree and the user
144+ // is now going back, create space in the list for the list to move "left"
145+ var aux = navigationListView.highlightMoveDuration;
146+ navigationListView.highlightMoveDuration = 0;
147+ navigationModel.insert(0, {"navigationId": navigation.parentNavigationId, "nullifyNavigation": false});
148+ navigationListView.currentIndex = navigationListView.currentIndex + 1;
149+ navigationListView.contentX = width * navigationListView.currentIndex;
150+ navigationListView.highlightMoveDuration = aux;
142 scope.setNavigationState(navigation.parentNavigationId, isAltNavigation);
153 scope.setNavigationState(navigation.parentNavigationId, isAltNavigation);
143 isGoingBack = true;
154 isGoingBack = true;
144 navigationModel.setProperty(navigationListView.currentIndex - 1, "nullifyNavigation", false);
155 navigationModel.setProperty(navigationListView.currentIndex - 1, "nullifyNavigation", false);
@@ -153,6 +164,9 @@ AbstractButton {
155 onContentXChanged: {
166 onContentXChanged: {
167+ if (navigationListView.highlightMoveDuration == 0)
156 if (contentX == width * navigationListView.currentIndex) {
170 if (contentX == width * navigationListView.currentIndex) {
157 if (isGoingBack) {
171 if (isGoingBack) {
158 navigationModel.remove(navigationListView.currentIndex + 1);
172 navigationModel.remove(navigationListView.currentIndex + 1);
@@ -175,9 +189,18 @@ AbstractButton {
177 onScopeChanged: {
191 onScopeChanged: {
195+ function setNewNavigation() {
178 navigationModel.clear();
196 navigationModel.clear();
179 if (scope && scope[hasNavigation]) {
197 if (scope && scope[hasNavigation]) {
198+ var navigation = getNavigation(scope[currentNavigationId]);
199+ if (navigation.count > 0) {
180− navigationModel.append({"navigationId": scope[currentNavigationId], "nullifyNavigation": false});
200+ navigationModel.append({"navigationId": scope[currentNavigationId], "nullifyNavigation": false});
202+ navigationModel.append({"navigationId": navigation.parentNavigationId, "nullifyNavigation": false});
@@ -186,20 +209,12 @@ AbstractButton {
186 // This is duplicated since we can't have something based on the dynamic hasNavigation string property
209 // This is duplicated since we can't have something based on the dynamic hasNavigation string property
187 onHasNavigationChanged: {
210 onHasNavigationChanged: {
188 if (!root.isAltNavigation) {
211 if (!root.isAltNavigation) {
189− if (scope.hasNavigation) {
212+ setNewNavigation();
190− navigationModel.append({"navigationId": scope.currentNavigationId, "nullifyNavigation": false});
192− navigationModel.clear();
196 onHasAltNavigationChanged: {
215 onHasAltNavigationChanged: {
197 if (root.isAltNavigation) {
216 if (root.isAltNavigation) {
198− if (scope.hasAltNavigation) {
217+ setNewNavigation();
199− navigationModel.append({"navigationId": scope.currentAltNavigationId, "nullifyNavigation": false});
201− navigationModel.clear();