diff options
Diffstat (limited to 'plugins/GCodeProfileReader')
-rw-r--r-- | plugins/GCodeProfileReader/GCodeProfileReader.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/GCodeProfileReader/GCodeProfileReader.py b/plugins/GCodeProfileReader/GCodeProfileReader.py index 5915395005..1ce1473582 100644 --- a/plugins/GCodeProfileReader/GCodeProfileReader.py +++ b/plugins/GCodeProfileReader/GCodeProfileReader.py @@ -75,15 +75,16 @@ class GCodeProfileReader(ProfileReader): # Create an empty profile - the id will be changed later profile = InstanceContainer("") - profile.addMetaDataEntry("type", "quality") try: profile.deserialize(serialized) except Exception as e: # Not a valid g-code file. Logger.log("e", "Unable to serialise the profile: %s", str(e)) return None + profile.addMetaDataEntry("type", "quality") + #Creating a unique name using the filename of the GCode - new_name = catalog.i18nc("@label", "Custom profile (%s)") %(os.path.splitext(os.path.basename(file_name))[0]) + new_name = catalog.i18nc("@label", "G-Code-imported profile") profile.setName(new_name) profile._id = new_name |