Actions are now reset before every run

CURA-1385
This commit is contained in:
Jaime van Kessel 2016-06-22 14:39:41 +02:00
parent dcafb7d83a
commit d5b07d29de
3 changed files with 7 additions and 4 deletions

View File

@ -792,17 +792,14 @@ UM.MainWindow
for (var i = 0; i < actions.length; i++) for (var i = 0; i < actions.length; i++)
{ {
actions[i].displayItem.reset()
firstRunWizard.appendPage(actions[i].displayItem, catalog.i18nc("@title", actions[i].label)); firstRunWizard.appendPage(actions[i].displayItem, catalog.i18nc("@title", actions[i].label));
//firstRunWizard.appendPage(actions[i].displayItem, catalog.i18nc("@title","blarg"));
console.log("ZOMGIE", i, actions[i].displayItem)
//firstRunWizard.appendPage(test, catalog.i18nc("@title", "Add Printer"));
} }
//Only start if there are actions to perform. //Only start if there are actions to perform.
if (actions.length > 0) if (actions.length > 0)
{ {
firstRunWizard.currentPage = 0; firstRunWizard.currentPage = 0;
console.log(firstRunWizard.currentPage)
show() show()
} }
} }

View File

@ -7,4 +7,9 @@ Item
property var finished: manager.finished property var finished: manager.finished
onFinishedChanged: if(manager.finished) {completed()} onFinishedChanged: if(manager.finished) {completed()}
signal completed() signal completed()
function reset()
{
manager.reset()
}
} }

View File

@ -54,6 +54,7 @@ UM.ManagementPage
onClicked: onClicked:
{ {
actionDialog.content = machineActionRepeater.model[index].displayItem actionDialog.content = machineActionRepeater.model[index].displayItem
machineActionRepeater.model[index].displayItem.reset()
actionDialog.show() actionDialog.show()
} }
} }