Fix reentry of add machine wizard when skipping bedleveling

This commit is contained in:
fieldOfView 2016-02-22 16:41:09 +01:00
parent 1e7de43934
commit b519c910ea

View file

@ -107,7 +107,18 @@ Item
anchors.left: parent.width < wizardPage.width ? bedlevelingButton.right : parent.left
anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0
text: catalog.i18nc("@action:button","Skip Bedleveling");
onClicked: base.visible = false;
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
}
}
}
}