mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
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:
parent
c865bb13ea
commit
c06e5f4d39
1 changed files with 1 additions and 6 deletions
|
@ -73,7 +73,7 @@ class GCodeProfileReader(ProfileReader):
|
||||||
serialized = pattern.sub(lambda m: GCodeProfileReader.escape_characters[re.escape(m.group(0))], serialized)
|
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)))
|
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("")
|
profile = InstanceContainer("")
|
||||||
try:
|
try:
|
||||||
profile.deserialize(serialized)
|
profile.deserialize(serialized)
|
||||||
|
@ -83,9 +83,4 @@ class GCodeProfileReader(ProfileReader):
|
||||||
|
|
||||||
profile.addMetaDataEntry("type", "quality")
|
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
|
return profile
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue