mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 17:05:10 +08:00
Merge pull request #19393 from Ultimaker/CURA-11958_fix_autoselect_mbot_format
[CURA-11958] fix auto-select `.makerbot` format
This commit is contained in:
commit
931aac2cb0
@ -83,6 +83,15 @@ class GlobalStack(CuraContainerStack):
|
|||||||
"""
|
"""
|
||||||
return self.getMetaDataEntry("supports_material_export", False)
|
return self.getMetaDataEntry("supports_material_export", False)
|
||||||
|
|
||||||
|
@pyqtProperty("QVariantList", constant = True)
|
||||||
|
def getOutputFileFormats(self) -> List[str]:
|
||||||
|
"""
|
||||||
|
Which output formats the printer supports.
|
||||||
|
:return: A list of strings with MIME-types.
|
||||||
|
"""
|
||||||
|
all_formats_str = self.getMetaDataEntry("file_formats", "")
|
||||||
|
return all_formats_str.split(";")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def getLoadingPriority(cls) -> int:
|
def getLoadingPriority(cls) -> int:
|
||||||
return 2
|
return 2
|
||||||
|
@ -208,7 +208,7 @@ Item
|
|||||||
anchors.rightMargin: UM.Theme.getSize("thin_margin").height
|
anchors.rightMargin: UM.Theme.getSize("thin_margin").height
|
||||||
|
|
||||||
enabled: UM.Backend.state == UM.Backend.Done
|
enabled: UM.Backend.state == UM.Backend.Done
|
||||||
currentIndex: UM.Backend.state == UM.Backend.Done ? dfFilenameTextfield.text.startsWith("MM")? 1 : 0 : 2
|
currentIndex: UM.Backend.state == UM.Backend.Done ? (Cura.MachineManager.activeMachine.getOutputFileFormats.includes("application/x-makerbot") ? 1 : 0) : 2
|
||||||
|
|
||||||
textRole: "text"
|
textRole: "text"
|
||||||
valueRole: "value"
|
valueRole: "value"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user