mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 06:55:54 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
bfdb5e68a1
@ -349,6 +349,9 @@ class ContainerManager(QObject):
|
|||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
return { "status": "error", "message": "Unable to serialize container"}
|
return { "status": "error", "message": "Unable to serialize container"}
|
||||||
|
|
||||||
|
if contents is None:
|
||||||
|
return {"status": "error", "message": "Serialization returned None. Unable to write to file"}
|
||||||
|
|
||||||
with UM.SaveFile(file_url, "w") as f:
|
with UM.SaveFile(file_url, "w") as f:
|
||||||
f.write(contents)
|
f.write(contents)
|
||||||
|
|
||||||
|
@ -91,12 +91,9 @@ class MachineInstance:
|
|||||||
|
|
||||||
if has_machine_qualities: #This machine now has machine-quality profiles.
|
if has_machine_qualities: #This machine now has machine-quality profiles.
|
||||||
active_material += "_" + variant_materials #That means that the profile was split into multiple.
|
active_material += "_" + variant_materials #That means that the profile was split into multiple.
|
||||||
current_settings = "" #The profile didn't know the definition ID when it was upgraded, so it will have been invalid. Sorry, your current settings are lost now.
|
|
||||||
else:
|
|
||||||
current_settings = self._name + "_current_settings"
|
|
||||||
|
|
||||||
containers = [
|
containers = [
|
||||||
current_settings,
|
"", #The current profile doesn't know the definition ID when it was upgraded, only the instance ID, so it will be invalid. Sorry, your current settings are lost now.
|
||||||
active_quality_changes,
|
active_quality_changes,
|
||||||
active_quality,
|
active_quality,
|
||||||
active_material,
|
active_material,
|
||||||
|
@ -80,7 +80,7 @@ class Profile:
|
|||||||
import VersionUpgrade21to22 # Import here to prevent circular dependencies.
|
import VersionUpgrade21to22 # Import here to prevent circular dependencies.
|
||||||
|
|
||||||
if self._name == "Current settings":
|
if self._name == "Current settings":
|
||||||
self._filename += "_current_settings" #This resolves a duplicate ID arising from how Cura 2.1 stores its current settings.
|
return None #Can't upgrade these, because the new current profile needs to specify the definition ID and the old file only had the machine instance, not the definition.
|
||||||
|
|
||||||
config = configparser.ConfigParser(interpolation = None)
|
config = configparser.ConfigParser(interpolation = None)
|
||||||
|
|
||||||
|
@ -85,9 +85,6 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer):
|
|||||||
# base file: global settings + supported machines
|
# base file: global settings + supported machines
|
||||||
# machine / variant combination: only changes for itself.
|
# machine / variant combination: only changes for itself.
|
||||||
def serialize(self):
|
def serialize(self):
|
||||||
if self._read_only:
|
|
||||||
return
|
|
||||||
|
|
||||||
registry = UM.Settings.ContainerRegistry.getInstance()
|
registry = UM.Settings.ContainerRegistry.getInstance()
|
||||||
|
|
||||||
base_file = self.getMetaDataEntry("base_file", "")
|
base_file = self.getMetaDataEntry("base_file", "")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user