mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 15:15:56 +08:00
uses a different method to check whether a machine name excists
contributes to #CURA-325
This commit is contained in:
parent
2987da6dcf
commit
9320fc1af5
@ -52,7 +52,7 @@ Item
|
|||||||
var name = machineList.model.getItem(machineList.currentIndex).name
|
var name = machineList.model.getItem(machineList.currentIndex).name
|
||||||
|
|
||||||
//if the automatically assigned name is not unique, the editMachineName function keeps editing it untill it is.
|
//if the automatically assigned name is not unique, the editMachineName function keeps editing it untill it is.
|
||||||
while (UM.MachineManager.getNameUniqueness(name) == false)
|
while (UM.MachineManager.checkInstanceExists(name) != false)
|
||||||
{
|
{
|
||||||
name = editMachineName(name)
|
name = editMachineName(name)
|
||||||
}
|
}
|
||||||
@ -65,7 +65,7 @@ Item
|
|||||||
onNextClicked: //You can add functions here that get triggered when the final button is clicked in the wizard-element
|
onNextClicked: //You can add functions here that get triggered when the final button is clicked in the wizard-element
|
||||||
{
|
{
|
||||||
var name = machineName.text
|
var name = machineName.text
|
||||||
if (UM.MachineManager.getNameUniqueness(name) == false)
|
if (UM.MachineManager.checkInstanceExists(name) != false)
|
||||||
{
|
{
|
||||||
errorMessage.show = true
|
errorMessage.show = true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user