From 98ee8cab85d2d8318c496ba45a8939831bf6972a Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 9 Sep 2015 13:16:24 +0200 Subject: [PATCH] Pages are now reset when adding a new machine. Contributes to Ultimaker/Cura#353 --- resources/qml/WizardPages/AddMachine.qml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/qml/WizardPages/AddMachine.qml b/resources/qml/WizardPages/AddMachine.qml index a28c46ffd0..a89fa11a16 100644 --- a/resources/qml/WizardPages/AddMachine.qml +++ b/resources/qml/WizardPages/AddMachine.qml @@ -24,6 +24,12 @@ Item target: base.wizard onNextClicked: //You can add functions here that get triggered when the final button is clicked in the wizard-element { + 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) + } saveMachine() } onBackClicked: