mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 02:35:53 +08:00
Fixed some QML errors
This commit is contained in:
parent
39b12fed77
commit
1749a6f9d5
@ -323,7 +323,7 @@ Component
|
|||||||
Controls2.Button
|
Controls2.Button
|
||||||
{
|
{
|
||||||
id: pauseButton
|
id: pauseButton
|
||||||
text: modelData.activePrintJob.state == "paused" ? catalog.i18nc("@label", "Resume") : catalog.i18nc("@label", "Pause")
|
text: modelData.activePrintJob != null && modelData.activePrintJob.state == "paused" ? catalog.i18nc("@label", "Resume") : catalog.i18nc("@label", "Pause")
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
if(modelData.activePrintJob.state == "paused")
|
if(modelData.activePrintJob.state == "paused")
|
||||||
@ -337,7 +337,7 @@ Component
|
|||||||
popup.close()
|
popup.close()
|
||||||
}
|
}
|
||||||
width: parent.width
|
width: parent.width
|
||||||
enabled: ["paused", "printing"].indexOf(modelData.activePrintJob.state) >= 0
|
enabled: modelData.activePrintJob != null && ["paused", "printing"].indexOf(modelData.activePrintJob.state) >= 0
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 10
|
anchors.topMargin: 10
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
@ -360,7 +360,7 @@ Component
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
anchors.top: pauseButton.bottom
|
anchors.top: pauseButton.bottom
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
enabled: ["paused", "printing", "pre_print"].indexOf(modelData.activePrintJob.state) >= 0
|
enabled: modelData.activePrintJob != null && ["paused", "printing", "pre_print"].indexOf(modelData.activePrintJob.state) >= 0
|
||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
opacity: abortButton.down || abortButton.hovered ? 1 : 0
|
opacity: abortButton.down || abortButton.hovered ? 1 : 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user