mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Fix filtering of output MIME types removable drive
The RemovableDriveOutputDevice was selecting the preferred format to save the slice output in automatically. To select this, it was taking the intersection between the available output formats (for which there is a Writer plug-in) and the file formats that the printer supports. However if the printer supports a file format that is not supported by Cura, it would crash here because it was looking up the plug-in for a MIME type it doesn't know about. Stupid mistake. But not half as stupid as the bug I'm about to fix in the next commit. Fixes #4827.
This commit is contained in:
parent
d16ab4fdd6
commit
a747ca0661
2 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ class RemovableDriveOutputDevice(OutputDevice):
|
|||
|
||||
# Take the intersection between file_formats and machine_file_formats.
|
||||
format_by_mimetype = {format["mime_type"]: format for format in file_formats}
|
||||
file_formats = [format_by_mimetype[mimetype] for mimetype in machine_file_formats] #Keep them ordered according to the preference in machine_file_formats.
|
||||
file_formats = [format_by_mimetype[mimetype] for mimetype in machine_file_formats if mimetype in format_by_mimetype] # Keep them ordered according to the preference in machine_file_formats.
|
||||
|
||||
if len(file_formats) == 0:
|
||||
Logger.log("e", "There are no file formats available to write with!")
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"0": "SV01_extruder_0"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"overrides": {
|
||||
"machine_name": { "default_value": "SV01" },
|
||||
"machine_extruder_count": { "default_value": 1 },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue