The prepare button slices, so it should be a slice button

This commit is contained in:
Mark 2018-06-01 13:36:50 +02:00
parent 91a66d1290
commit a479176c63

View File

@ -100,8 +100,8 @@ Item {
if (saveToButton.enabled) { if (saveToButton.enabled) {
saveToButton.clicked(); saveToButton.clicked();
} }
// prepare button // slice button
if (prepareButton.enabled) { if (sliceButton.enabled) {
sliceOrStopSlicing(); sliceOrStopSlicing();
} }
} }
@ -131,7 +131,7 @@ Item {
Row { Row {
id: additionalComponentsRow id: additionalComponentsRow
anchors.top: parent.top anchors.top: parent.top
anchors.right: saveToButton.visible ? saveToButton.left : (prepareButton.visible ? prepareButton.left : parent.right) anchors.right: saveToButton.visible ? saveToButton.left : (sliceButton.visible ? sliceButton.left : parent.right)
anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.rightMargin: UM.Theme.getSize("default_margin").width
spacing: UM.Theme.getSize("default_margin").width spacing: UM.Theme.getSize("default_margin").width
@ -159,14 +159,14 @@ Item {
onPreferenceChanged: onPreferenceChanged:
{ {
var autoSlice = UM.Preferences.getValue("general/auto_slice"); var autoSlice = UM.Preferences.getValue("general/auto_slice");
prepareButton.autoSlice = autoSlice; sliceButton.autoSlice = autoSlice;
saveToButton.autoSlice = autoSlice; saveToButton.autoSlice = autoSlice;
} }
} }
// Prepare button, only shows if auto_slice is off // Slice button, only shows if auto_slice is off
Button { Button {
id: prepareButton id: sliceButton
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
@ -180,7 +180,7 @@ 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: [1, 4, 5].indexOf(base.backendState) != -1 ? catalog.i18nc("@label:Printjob", "Slice") : catalog.i18nc("@label:Printjob", "Cancel")
onClicked: onClicked:
{ {
sliceOrStopSlicing(); sliceOrStopSlicing();