Browse Source

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.
Ghostkeeper 4 years ago
parent
commit
95f1b11c45
1 changed files with 2 additions and 4 deletions
  1. 2 4
      resources/qml/Cura.qml

+ 2 - 4
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);
         }
     }