mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-10 07:15:03 -06:00
Merge branch '2.3' of github.com:Ultimaker/Cura into 2.3
This commit is contained in:
commit
22b890387b
9 changed files with 57 additions and 43 deletions
|
@ -248,39 +248,32 @@ Rectangle
|
|||
|
||||
text: {
|
||||
var result = "";
|
||||
if (!printerConnected) {
|
||||
if (!printerConnected)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
var jobState = Cura.MachineManager.printerOutputDevices[0].jobState;
|
||||
if (lastJobState != jobState) {
|
||||
// the userClicked message must disappear when an "automated" jobState comes by
|
||||
userClicked = false;
|
||||
lastJobState = jobState;
|
||||
}
|
||||
|
||||
if (jobState == "paused")
|
||||
{
|
||||
if (userClicked) {
|
||||
// User feedback for pretending we're already in "printing" mode.
|
||||
result = catalog.i18nc("@label:", "Pause");
|
||||
} else {
|
||||
result = catalog.i18nc("@label:", "Resume");
|
||||
}
|
||||
} else {
|
||||
if (userClicked) {
|
||||
// User feedback for pretending we're already in "pause" mode.
|
||||
result = catalog.i18nc("@label:", "Resume");
|
||||
} else {
|
||||
result = catalog.i18nc("@label:", "Pause");
|
||||
}
|
||||
return catalog.i18nc("@label:", "Resume");
|
||||
}
|
||||
else
|
||||
{
|
||||
return catalog.i18nc("@label:", "Pause");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
onClicked: {
|
||||
var newJobState = Cura.MachineManager.printerOutputDevices[0].jobState == "paused" ? "print" : "pause";
|
||||
Cura.MachineManager.printerOutputDevices[0].setJobState(newJobState);
|
||||
userClicked = true;
|
||||
onClicked:
|
||||
{
|
||||
var current_job_state = Cura.MachineManager.printerOutputDevices[0].jobState
|
||||
if(current_job_state == "paused")
|
||||
{
|
||||
Cura.MachineManager.printerOutputDevices[0].setJobState("print");
|
||||
}
|
||||
else if(current_job_state == "printing")
|
||||
{
|
||||
Cura.MachineManager.printerOutputDevices[0].setJobState("pause");
|
||||
}
|
||||
}
|
||||
|
||||
style: ButtonStyle
|
||||
|
|
|
@ -232,6 +232,19 @@ Column
|
|||
text: Cura.MachineManager.activeMaterialName
|
||||
tooltip: Cura.MachineManager.activeMaterialName
|
||||
visible: Cura.MachineManager.hasMaterials
|
||||
property var valueError:
|
||||
{
|
||||
var data = Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeMaterialId, "compatible")
|
||||
print(data)
|
||||
if(data == "" || data == "True")
|
||||
{
|
||||
return false
|
||||
}
|
||||
if(data == "False")
|
||||
{
|
||||
return true
|
||||
}
|
||||
}
|
||||
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
|
||||
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
|
|
|
@ -15,7 +15,11 @@ QtObject {
|
|||
{
|
||||
if(control.enabled)
|
||||
{
|
||||
if(control.valueWarning)
|
||||
if(control.valueError)
|
||||
{
|
||||
return Theme.getColor("setting_validation_error");
|
||||
}
|
||||
else if(control.valueWarning)
|
||||
{
|
||||
return Theme.getColor("setting_validation_warning");
|
||||
} else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue