diff --git a/resources/qml/WizardPages/AddMachine.qml b/resources/qml/WizardPages/AddMachine.qml index 0c235320db..e4d40d7723 100644 --- a/resources/qml/WizardPages/AddMachine.qml +++ b/resources/qml/WizardPages/AddMachine.qml @@ -34,25 +34,10 @@ Item target: base.wizard onNextClicked: //You can add functions here that get triggered when the final button is clicked in the wizard-element { - var name = machineName.text - - var old_page_count = base.wizard.getPageCount() - // Delete old pages (if any) - for (var i = old_page_count - 1; i > 0; i--) - { - base.wizard.removePage(i) - } + base.wizard.resetPages() saveMachine() } - onBackClicked: - { - var old_page_count = base.wizard.getPageCount() - // Delete old pages (if any) - for (var i = old_page_count - 1; i > 0; i--) - { - base.wizard.removePage(i) - } - } + onBackClicked: base.wizard.resetPages() } Label @@ -249,9 +234,6 @@ Item break; } } - if(base.wizard.lastPage == true){ - base.wizard.visible = false - } } } diff --git a/resources/qml/WizardPages/Bedleveling.qml b/resources/qml/WizardPages/Bedleveling.qml index 1721f0fd4a..77d956f29b 100644 --- a/resources/qml/WizardPages/Bedleveling.qml +++ b/resources/qml/WizardPages/Bedleveling.qml @@ -28,17 +28,6 @@ Item UM.I18nCatalog { id: catalog; name:"cura"} property variant wizard: null; - Connections - { - target: wizardPage.wizard - onNextClicked: //You can add functions here that get triggered when the final button is clicked in the wizard-element - { - if(wizardPage.wizard.lastPage == true){ - wizardPage.wizard.visible = false - } - } - } - Label { id: pageTitle @@ -120,18 +109,7 @@ Item anchors.left: parent.width < wizardPage.width ? bedlevelingButton.right : parent.left anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.getSize("default_margin").width : 0 text: catalog.i18nc("@action:button","Skip Bedleveling"); - onClicked: { - if(wizardPage.wizard.lastPage == true){ - var old_page_count = wizardPage.wizard.getPageCount() - // Delete old pages (if any) - for (var i = old_page_count - 1; i > 0; i--) - { - wizardPage.wizard.removePage(i) - } - wizardPage.wizard.currentPage = 0 - wizardPage.wizard.visible = false - } - } + onClicked: base.nextPage() } } diff --git a/resources/qml/WizardPages/UltimakerCheckup.qml b/resources/qml/WizardPages/UltimakerCheckup.qml index b8c8aebe12..aafbce79f9 100644 --- a/resources/qml/WizardPages/UltimakerCheckup.qml +++ b/resources/qml/WizardPages/UltimakerCheckup.qml @@ -114,9 +114,7 @@ Item anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.getSize("default_margin").width : 0 //enabled: !alreadyTested text: catalog.i18nc("@action:button","Skip Printer Check"); - onClicked: { - base.currentPage += 1 - } + onClicked: base.nextPage() } } diff --git a/resources/qml/WizardPages/UpgradeFirmware.qml b/resources/qml/WizardPages/UpgradeFirmware.qml index 4bbb049f20..467e947e35 100644 --- a/resources/qml/WizardPages/UpgradeFirmware.qml +++ b/resources/qml/WizardPages/UpgradeFirmware.qml @@ -71,9 +71,7 @@ Item anchors.left: parent.width < wizardPage.width ? upgradeButton.right : parent.left anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.getSize("default_margin").width : 0 text: catalog.i18nc("@action:button","Skip Upgrade"); - onClicked: { - base.currentPage += 1 - } + onClicked: base.nextPage() } } ExclusiveGroup { id: printerGroup; }