Browse Source

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
fieldOfView 8 years ago
parent
commit
c06e5f4d39
1 changed files with 1 additions and 6 deletions
  1. 1 6
      plugins/GCodeProfileReader/GCodeProfileReader.py

+ 1 - 6
plugins/GCodeProfileReader/GCodeProfileReader.py

@@ -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