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:
authorJaime van Kessel <nallath@gmail.com>2016-03-01 18:24:43 +0300
committerJaime van Kessel <nallath@gmail.com>2016-03-01 18:24:43 +0300
commit9c5e169f2bca0b0101ce8e8d78ff9ddb821c4d67 (patch)
tree8a92cfb17665360512fb97788c31359d45d15a88 /plugins/GCodeProfileReader
parente90fd954951c0696b2bdd8169c3343cd231e8127 (diff)
Loaded profiles are now marked as dirty so they are saved correctly
CURA-936
Diffstat (limited to 'plugins/GCodeProfileReader')
-rw-r--r--plugins/GCodeProfileReader/GCodeProfileReader.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/GCodeProfileReader/GCodeProfileReader.py b/plugins/GCodeProfileReader/GCodeProfileReader.py
index b90c01ddf4..140547a05c 100644
--- a/plugins/GCodeProfileReader/GCodeProfileReader.py
+++ b/plugins/GCodeProfileReader/GCodeProfileReader.py
@@ -66,7 +66,10 @@ class GCodeProfileReader(ProfileReader):
profile = Profile(machine_manager = Application.getInstance().getMachineManager(), read_only = False)
try:
profile.unserialise(serialised)
- except Exception as e: #Not a valid g-code file.
+ profile.setType(None) #Force type to none so it's correctly added.
+ profile.setReadOnly(False)
+ profile.setDirty(True)
+ except Exception as e: #Not a valid g-comachine_instance_profilede file.
Logger.log("e", "Unable to serialise the profile: %s", str(e))
return None
return profile \ No newline at end of file