Remove unused name/id when importing a profile from a gcode file

A unique name will be set from the filename by ContainerRegistry
CURA-1615
This commit is contained in:
fieldOfView 2016-07-05 21:58:47 +02:00
parent c865bb13ea
commit c06e5f4d39

View file

@ -73,7 +73,7 @@ class GCodeProfileReader(ProfileReader):
serialized = pattern.sub(lambda m: GCodeProfileReader.escape_characters[re.escape(m.group(0))], serialized)
Logger.log("i", "Serialized the following from %s: %s" %(file_name, repr(serialized)))
# Create an empty profile - the id will be changed later
# Create an empty profile - the id and name will be changed by the ContainerRegistry
profile = InstanceContainer("")
try:
profile.deserialize(serialized)
@ -83,9 +83,4 @@ class GCodeProfileReader(ProfileReader):
profile.addMetaDataEntry("type", "quality")
#Creating a unique name using the filename of the GCode
new_name = catalog.i18nc("@label", "G-Code-imported profile")
profile.setName(new_name)
profile._id = new_name
return profile