From c06e5f4d39af1faedf24fd26b25beeb2f4dd1a9b Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 5 Jul 2016 21:58:47 +0200 Subject: [PATCH] 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 --- plugins/GCodeProfileReader/GCodeProfileReader.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plugins/GCodeProfileReader/GCodeProfileReader.py b/plugins/GCodeProfileReader/GCodeProfileReader.py index 1ce1473582..1e649b7dd4 100644 --- a/plugins/GCodeProfileReader/GCodeProfileReader.py +++ b/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