Merge branch 'machine-actions-improvement' of github.com:julianCast/Cura

This commit is contained in:
Jaime van Kessel 2022-09-26 10:22:18 +02:00
commit ea16597dd6
No known key found for this signature in database
GPG key ID: C85F7A3AF1BAA7C4
2 changed files with 49 additions and 4 deletions

View file

@ -67,16 +67,21 @@ UM.ManagementPage
{
width: Math.round(childrenRect.width + 2 * screenScaleFactor)
height: childrenRect.height
visible: machineActionRepeater.model[index].visible
Cura.SecondaryButton
{
text: machineActionRepeater.model[index].label
onClicked:
{
var currentItem = machineActionRepeater.model[index]
actionDialog.loader.manager = currentItem
actionDialog.loader.source = currentItem.qmlPath
actionDialog.title = currentItem.label
actionDialog.show()
if (currentItem.shouldOpenAsDialog) {
actionDialog.loader.manager = currentItem
actionDialog.loader.source = currentItem.qmlPath
actionDialog.title = currentItem.label
actionDialog.show()
} else {
currentItem.execute()
}
}
}
}