Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Karl Pietrowski <thopiekar@googlemail.com>2016-06-24 17:01:47 +0300
committerThomas Karl Pietrowski <thopiekar@googlemail.com>2016-06-24 17:01:47 +0300
commit93cdce7b3360b2b285ca32f8b7cf7ba7522381a9 (patch)
tree693e531b56bc2359d60ace8cdb8f3c4cc4e89330 /plugins/GCodeProfileReader
parentd49ba8011775957eebc63f17aed808216629da1b (diff)
GCodeProfileReader: Fixing read of profiles from GCode
Diffstat (limited to 'plugins/GCodeProfileReader')
-rw-r--r--plugins/GCodeProfileReader/GCodeProfileReader.py5
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