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.
This commit is contained in:
Ghostkeeper 2020-10-30 17:45:42 +01:00
parent a2d2043b3c
commit 95f1b11c45
No known key found for this signature in database
GPG Key ID: D2A8871EE34EC59A

View File

@ -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);
}
}