From 282b6ebce052e70b84be75c3514e8b5fe60e04d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Dezeiraud?= Date: Thu, 28 Nov 2024 10:51:38 +0100 Subject: [PATCH] Fix FluNavigationView noStackPush Fix FluNavigationView noStackPush to verify if an argument is passed. If true, it is better to set the page has a new one in order to update it with the arguments. --- src/Qt5/imports/FluentUI/Controls/FluNavigationView.qml | 2 +- src/Qt6/imports/FluentUI/Controls/FluNavigationView.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Qt5/imports/FluentUI/Controls/FluNavigationView.qml b/src/Qt5/imports/FluentUI/Controls/FluNavigationView.qml index 3d06ad29..a9497751 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluNavigationView.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluNavigationView.qml @@ -1313,7 +1313,7 @@ Item { d.stackItems = d.stackItems.concat(nav_list.model[nav_list.currentIndex]) } function noStackPush(){ - if(loader_content.source.toString() === url){ + if(loader_content.source.toString() === url && Object.keys(argument).length === 0){ return } loader_content.setSource(url,argument) diff --git a/src/Qt6/imports/FluentUI/Controls/FluNavigationView.qml b/src/Qt6/imports/FluentUI/Controls/FluNavigationView.qml index b9b2a229..c5205446 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluNavigationView.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluNavigationView.qml @@ -1314,7 +1314,7 @@ Item { d.stackItems = d.stackItems.concat(nav_list.model[nav_list.currentIndex]) } function noStackPush(){ - if(loader_content.source.toString() === url){ + if(loader_content.source.toString() === url && Object.keys(argument).length === 0){ return } loader_content.setSource(url,argument)