Make MachineSelector more generic by detaching logic from view

By detaching the logic from the view custom handlers can be added to selecting printers. This was needed as the MachineSelector in the `WorkspaceDialog` needed to do something different from the `PreparMenu`.

CURA-9424
This commit is contained in:
c.lamboo 2022-11-09 12:54:38 +01:00
parent 088ea0a768
commit dd4e1c66b7
4 changed files with 45 additions and 56 deletions

View file

@ -56,6 +56,13 @@ Item
Layout.fillWidth: true
Layout.fillHeight: true
machineManager: Cura.MachineManager
onSelectPrinter: function(machine)
{
toggleContent();
Cura.MachineManager.setActiveMachine(machine.id);
}
machineListModel: Cura.MachineListModel {}
buttons: [