mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Move logic for deciding the initially selected printer that was inside WorkspaceDialog.qml before into WorkspaceDialog.py.
A block of code is run after dialog.show() and most of the dialog assignment. This is because dialog.show() resets the _result dictionary, we want to update the values in _result afterwards. CURA-9424
This commit is contained in:
parent
cc9a698f42
commit
156004cb17
2 changed files with 31 additions and 8 deletions
|
@ -129,12 +129,11 @@ UM.Dialog
|
|||
width: parent.width - leftPadding * 1.5
|
||||
onClicked:
|
||||
{
|
||||
toggleContent()
|
||||
manager.setResolveStrategy("machine", "new")
|
||||
machineSelector.machineName = catalog.i18nc("@button", "Create new")
|
||||
manager.setIsAbstractMachine(false)
|
||||
manager.setIsNetworkedMachine(false)
|
||||
|
||||
toggleContent()
|
||||
manager.setResolveStrategy("machine", "new")
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -142,11 +141,11 @@ UM.Dialog
|
|||
onSelectPrinter: function(machine)
|
||||
{
|
||||
toggleContent();
|
||||
machineSelector.machineName = machine.name
|
||||
manager.setResolveStrategy("machine", "override")
|
||||
manager.setMachineToOverride(machine.id)
|
||||
manager.setIsAbstractMachine(machine.isAbstractMachine)
|
||||
manager.setIsNetworkedMachine(machine.isNetworked)
|
||||
machineSelector.machineName = machine.name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue