mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Loaded profiles are now marked as dirty so they are saved correctly
CURA-936
This commit is contained in:
parent
e90fd95495
commit
9c5e169f2b
2 changed files with 5 additions and 2 deletions
|
@ -66,7 +66,10 @@ class GCodeProfileReader(ProfileReader):
|
||||||
profile = Profile(machine_manager = Application.getInstance().getMachineManager(), read_only = False)
|
profile = Profile(machine_manager = Application.getInstance().getMachineManager(), read_only = False)
|
||||||
try:
|
try:
|
||||||
profile.unserialise(serialised)
|
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))
|
Logger.log("e", "Unable to serialise the profile: %s", str(e))
|
||||||
return None
|
return None
|
||||||
return profile
|
return profile
|
|
@ -124,5 +124,5 @@ class LegacyProfileReader(ProfileReader):
|
||||||
|
|
||||||
if len(profile.getChangedSettings()) == 0:
|
if len(profile.getChangedSettings()) == 0:
|
||||||
Logger.log("i", "A legacy profile was imported but everything evaluates to the defaults, creating an empty profile.")
|
Logger.log("i", "A legacy profile was imported but everything evaluates to the defaults, creating an empty profile.")
|
||||||
|
profile.setDirty(True)
|
||||||
return profile
|
return profile
|
Loading…
Add table
Add a link
Reference in a new issue