mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06: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
1 changed files with 11 additions and 7 deletions
|
@ -183,13 +183,17 @@ UM.Dialog
|
|||
text: catalog.i18nc("@action:button", "Add Printer")
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
onClicked:
|
||||
{
|
||||
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.
|
||||
}
|
||||
onClicked: addMachine()
|
||||
}
|
||||
|
||||
onAccepted: addMachine()
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue