mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Merge branch '3.0' of github.com:Ultimaker/Cura
This commit is contained in:
commit
9f8691feef
18 changed files with 170 additions and 140 deletions
|
@ -217,8 +217,7 @@ UM.Dialog
|
|||
{
|
||||
base.visible = false
|
||||
var item = machineList.model.getItem(machineList.currentIndex);
|
||||
var defaultName = (item != undefined) ? item.name : ""
|
||||
Cura.MachineManager.addMachine(machineName.text, item.id, defaultName)
|
||||
Cura.MachineManager.addMachine(machineName.text, item.id)
|
||||
base.machineAdded(item.id) // Emit signal that the user added a machine.
|
||||
}
|
||||
|
||||
|
|
|
@ -39,11 +39,8 @@ Menu
|
|||
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].materialNames.length > extruderIndex
|
||||
onTriggered:
|
||||
{
|
||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
var materialId = Cura.MachineManager.printerOutputDevices[0].materialIds[extruderIndex];
|
||||
var items = materialsModel.items;
|
||||
// materialsModel.find cannot be used because we need to look inside the metadata property of items
|
||||
for(var i in items)
|
||||
{
|
||||
if (items[i]["metadata"]["GUID"] == materialId)
|
||||
|
@ -52,7 +49,6 @@ Menu
|
|||
break;
|
||||
}
|
||||
}
|
||||
ExtruderManager.setActiveExtruderIndex(activeExtruderIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,6 +68,8 @@ Menu
|
|||
exclusiveGroup: group
|
||||
onTriggered:
|
||||
{
|
||||
// This workaround is done because of the application menus for materials and variants for multiextrusion printers.
|
||||
// The extruder menu would always act on the correspoding extruder only, instead of acting on the extruder selected in the UI.
|
||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
Cura.MachineManager.setActiveMaterial(model.id);
|
||||
|
@ -113,6 +111,8 @@ Menu
|
|||
exclusiveGroup: group
|
||||
onTriggered:
|
||||
{
|
||||
// This workaround is done because of the application menus for materials and variants for multiextrusion printers.
|
||||
// The extruder menu would always act on the correspoding extruder only, instead of acting on the extruder selected in the UI.
|
||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
ExtruderManager.setActiveExtruderIndex(extruderIndex);
|
||||
Cura.MachineManager.setActiveMaterial(model.id);
|
||||
|
|
|
@ -91,12 +91,7 @@ Column
|
|||
Connections
|
||||
{
|
||||
target: Cura.MachineManager
|
||||
onGlobalContainerChanged:
|
||||
{
|
||||
forceActiveFocus() // Changing focus applies the currently-being-typed values so it can change the displayed setting values.
|
||||
var extruder_index = (machineExtruderCount.properties.value == 1) ? -1 : 0
|
||||
ExtruderManager.setActiveExtruderIndex(extruder_index);
|
||||
}
|
||||
onGlobalContainerChanged: forceActiveFocus() // Changing focus applies the currently-being-typed values so it can change the displayed setting values.
|
||||
}
|
||||
|
||||
delegate: Button
|
||||
|
|
|
@ -66,6 +66,7 @@ Item
|
|||
{
|
||||
target: Cura.MachineManager
|
||||
onActiveQualityChanged: qualityModel.update()
|
||||
onActiveMaterialChanged: qualityModel.update()
|
||||
}
|
||||
|
||||
ListModel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue