mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Autoselect file-format: Split up long line and better documentation.
done as part of CURA-11957
This commit is contained in:
parent
97ba9fb45f
commit
8b47ce0315
1 changed files with 8 additions and 1 deletions
|
@ -208,7 +208,14 @@ 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 ? ((Cura.MachineManager.activeMachine.getOutputFileFormats.includes("application/x-makerbot") || Cura.MachineManager.activeMachine.getOutputFileFormats.includes("application/x-makerbot-sketch")) ? 1 : 0) : 2
|
|
||||||
|
// Pre-select the correct index, depending on the situation (see the model-property below):
|
||||||
|
// - Don't select any post-slice-file-format when the engine isn't done.
|
||||||
|
// - Choose either the S-series or the Makerbot-series of printers' format otherwise, depending on the active printer.
|
||||||
|
// This way, the user can just click 'save' without having to worry about wether or not the format is right.
|
||||||
|
property int isMakerbotFormat: Cura.MachineManager.activeMachine.getOutputFileFormats.includes("application/x-makerbot") || Cura.MachineManager.activeMachine.getOutputFileFormats.includes("application/x-makerbot-sketch")
|
||||||
|
property int isBackendDone: UM.Backend.state == UM.Backend.Done
|
||||||
|
currentIndex: isBackendDone ? (isMakerbotFormat ? 1 : 0) : 2
|
||||||
|
|
||||||
textRole: "text"
|
textRole: "text"
|
||||||
valueRole: "value"
|
valueRole: "value"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue