mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 23:15:52 +08:00
Merge pull request #4981 from Ultimaker/fix_output_device_selector
Change the behaviour of the output device selector
This commit is contained in:
commit
70e60e5313
@ -12,6 +12,12 @@ Item
|
|||||||
{
|
{
|
||||||
id: widget
|
id: widget
|
||||||
|
|
||||||
|
function requestWriteToDevice()
|
||||||
|
{
|
||||||
|
UM.OutputDeviceManager.requestWriteToDevice(UM.OutputDeviceManager.activeDevice, PrintInformation.jobName,
|
||||||
|
{ "filter_by_machine": true, "preferred_mimetypes": Cura.MachineManager.activeMachine.preferred_output_file_formats });
|
||||||
|
}
|
||||||
|
|
||||||
Cura.PrimaryButton
|
Cura.PrimaryButton
|
||||||
{
|
{
|
||||||
id: saveToButton
|
id: saveToButton
|
||||||
@ -32,9 +38,8 @@ Item
|
|||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
forceActiveFocus();
|
forceActiveFocus()
|
||||||
UM.OutputDeviceManager.requestWriteToDevice(UM.OutputDeviceManager.activeDevice, PrintInformation.jobName,
|
widget.requestWriteToDevice()
|
||||||
{ "filter_by_machine": true, "preferred_mimetypes": Cura.MachineManager.activeMachine.preferred_output_file_formats });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,6 +86,7 @@ Item
|
|||||||
delegate: Cura.ActionButton
|
delegate: Cura.ActionButton
|
||||||
{
|
{
|
||||||
text: model.description
|
text: model.description
|
||||||
|
visible: model.id != UM.OutputDeviceManager.activeDevice // Don't show the active device in the list
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
cornerRadius: 0
|
cornerRadius: 0
|
||||||
hoverColor: UM.Theme.getColor("primary")
|
hoverColor: UM.Theme.getColor("primary")
|
||||||
@ -88,6 +94,7 @@ Item
|
|||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
UM.OutputDeviceManager.setActiveDevice(model.id)
|
UM.OutputDeviceManager.setActiveDevice(model.id)
|
||||||
|
widget.requestWriteToDevice()
|
||||||
popup.close()
|
popup.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user