mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-02 23:31:42 -07:00
Merge pull request #5717 from Ultimaker/CL-1259_hide_useless_override_button
CL-1259 Hide the Override button if it is not an option
This commit is contained in:
commit
f81340c14a
1 changed files with 15 additions and 0 deletions
|
|
@ -30,6 +30,21 @@ UM.Dialog
|
||||||
OutputDevice.forceSendJob(printer.activePrintJob.key)
|
OutputDevice.forceSendJob(printer.activePrintJob.key)
|
||||||
overrideConfirmationDialog.close()
|
overrideConfirmationDialog.close()
|
||||||
}
|
}
|
||||||
|
visible:
|
||||||
|
{
|
||||||
|
if (!printer || !printer.activePrintJob)
|
||||||
|
{
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
var canOverride = false
|
||||||
|
for (var i = 0; i < printer.activePrintJob.configurationChanges.length; i++)
|
||||||
|
{
|
||||||
|
var change = printer.activePrintJob.configurationChanges[i]
|
||||||
|
canOverride = canOverride || change.typeOfChange === "material_change";
|
||||||
|
}
|
||||||
|
return canOverride
|
||||||
|
}
|
||||||
},
|
},
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue