From 95f1b11c45a45a88a5401721b9216126d7ffe336 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 30 Oct 2020 17:45:42 +0100 Subject: [PATCH] Set initial page through currentPage after initialising This has a delayed effect through a signal being emitted. That is necessary because the pagesList itself is also updated delayed, so at this time page 0 doesn't exist yet. Contributes to issue CURA-7501. --- resources/qml/Cura.qml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 3aa9dc558f..9f24d91caf 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -466,15 +466,13 @@ UM.MainWindow insertPage(3, catalog.i18nc("@title:tab", "Materials"), Qt.resolvedUrl("Preferences/Materials/MaterialsPage.qml")); insertPage(4, catalog.i18nc("@title:tab", "Profiles"), Qt.resolvedUrl("Preferences/ProfilesPage.qml")); - - //Force refresh - setPage(0); + currentPage = 0; } onVisibleChanged: { // When the dialog closes, switch to the General page. - // This prevents us from having a heavy page like Setting Visiblity active in the background. + // This prevents us from having a heavy page like Setting Visibility active in the background. setPage(0); } }