mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-17 21:56:41 +08:00
Merge branch '2.3' of github.com:Ultimaker/Cura into 2.3
This commit is contained in:
commit
b718109f72
@ -382,7 +382,7 @@ class CuraApplication(QtApplication):
|
||||
|
||||
if path:
|
||||
instance.setPath(path)
|
||||
with SaveFile(path, "wt", -1, "utf-8") as f:
|
||||
with SaveFile(path, "wt") as f:
|
||||
f.write(data)
|
||||
|
||||
for stack in ContainerRegistry.getInstance().findContainerStacks():
|
||||
@ -409,7 +409,7 @@ class CuraApplication(QtApplication):
|
||||
path = Resources.getStoragePath(self.ResourceTypes.ExtruderStack, file_name)
|
||||
if path:
|
||||
stack.setPath(path)
|
||||
with SaveFile(path, "wt", -1, "utf-8") as f:
|
||||
with SaveFile(path, "wt") as f:
|
||||
f.write(data)
|
||||
|
||||
|
||||
|
@ -67,7 +67,7 @@ class RemovableDriveOutputDevice(OutputDevice):
|
||||
try:
|
||||
Logger.log("d", "Writing to %s", file_name)
|
||||
# Using buffering greatly reduces the write time for many lines of gcode
|
||||
self._stream = open(file_name, "wt", buffering = 1)
|
||||
self._stream = open(file_name, "wt", buffering = 1, encoding = "utf-8")
|
||||
job = WriteMeshJob(writer, self._stream, node, MeshWriter.OutputMode.TextMode)
|
||||
job.setFileName(file_name)
|
||||
job.progress.connect(self._onProgress)
|
||||
|
@ -111,7 +111,7 @@ class MachineInstance:
|
||||
user_profile_file = os.path.join(user_storage, urllib.parse.quote_plus(self._name) + "_current_settings.inst.cfg")
|
||||
if not os.path.exists(user_storage):
|
||||
os.makedirs(user_storage)
|
||||
with open(user_profile_file, "w") as file_handle:
|
||||
with open(user_profile_file, "w", encoding = "utf-8") as file_handle:
|
||||
user_profile.write(file_handle)
|
||||
version_upgrade_manager.upgradeExtraFile(user_storage, urllib.parse.quote_plus(self._name), "user")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user