mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 01:26:01 +08:00
Show Preparing text after clicking Prepare button
CURA-5551
This commit is contained in:
parent
9c6b676660
commit
812816de11
@ -168,6 +168,8 @@ Item {
|
|||||||
Button {
|
Button {
|
||||||
id: prepareButton
|
id: prepareButton
|
||||||
|
|
||||||
|
property bool showPrepare : false;
|
||||||
|
|
||||||
tooltip: [1, 5].indexOf(base.backendState) != -1 ? catalog.i18nc("@info:tooltip","Slice current printjob") : catalog.i18nc("@info:tooltip","Cancel slicing process")
|
tooltip: [1, 5].indexOf(base.backendState) != -1 ? catalog.i18nc("@info:tooltip","Slice current printjob") : catalog.i18nc("@info:tooltip","Cancel slicing process")
|
||||||
// 1 = not started, 2 = Processing
|
// 1 = not started, 2 = Processing
|
||||||
enabled: base.backendState != "undefined" && ([1, 2].indexOf(base.backendState) != -1) && base.activity
|
enabled: base.backendState != "undefined" && ([1, 2].indexOf(base.backendState) != -1) && base.activity
|
||||||
@ -180,9 +182,19 @@ Item {
|
|||||||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
|
|
||||||
// 1 = not started, 4 = error, 5 = disabled
|
// 1 = not started, 4 = error, 5 = disabled
|
||||||
text: [1, 4, 5].indexOf(base.backendState) != -1 ? catalog.i18nc("@label:Printjob", "Prepare") : catalog.i18nc("@label:Printjob", "Cancel")
|
text: {
|
||||||
|
|
||||||
|
if (base.backendState == 1 && showPrepare)
|
||||||
|
{
|
||||||
|
showPrepare = false
|
||||||
|
return catalog.i18nc("@label:Printjob", "Preparing")
|
||||||
|
}
|
||||||
|
|
||||||
|
return [1, 4, 5].indexOf(base.backendState) != -1 ? catalog.i18nc("@label:Printjob", "Prepare") : catalog.i18nc("@label:Printjob", "Cancel")
|
||||||
|
}
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
|
showPrepare = true
|
||||||
sliceOrStopSlicing();
|
sliceOrStopSlicing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user