mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
Prevent wizard pages from closing when they are "accepted" by pressing return.
Also removes some code replication in wizard pages. CURA-1354
This commit is contained in:
parent
134867f833
commit
cde23edfed
4 changed files with 5 additions and 49 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue