mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 16:48:58 +08:00
Add printer when pressing enter in Add Printer page instead of closing page
CURA-1354
This commit is contained in:
parent
fa0d8f912f
commit
78848567e0
@ -183,13 +183,17 @@ UM.Dialog
|
|||||||
text: catalog.i18nc("@action:button", "Add Printer")
|
text: catalog.i18nc("@action:button", "Add Printer")
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
onClicked:
|
onClicked: addMachine()
|
||||||
{
|
}
|
||||||
base.visible = false
|
|
||||||
var item = machineList.model.getItem(machineList.currentIndex);
|
onAccepted: addMachine()
|
||||||
Cura.MachineManager.addMachine(machineName.text, item.id)
|
|
||||||
base.machineAdded(item.id) // Emit signal that the user added a machine.
|
function addMachine()
|
||||||
}
|
{
|
||||||
|
base.visible = false
|
||||||
|
var item = machineList.model.getItem(machineList.currentIndex);
|
||||||
|
Cura.MachineManager.addMachine(machineName.text, item.id)
|
||||||
|
base.machineAdded(item.id) // Emit signal that the user added a machine.
|
||||||
}
|
}
|
||||||
|
|
||||||
Item
|
Item
|
||||||
|
Loading…
x
Reference in New Issue
Block a user