mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
87293e089d
7 changed files with 55 additions and 32 deletions
|
|
@ -100,8 +100,8 @@ Item {
|
|||
if (saveToButton.enabled) {
|
||||
saveToButton.clicked();
|
||||
}
|
||||
// slice button
|
||||
if (sliceButton.enabled) {
|
||||
// prepare button
|
||||
if (prepareButton.enabled) {
|
||||
sliceOrStopSlicing();
|
||||
}
|
||||
}
|
||||
|
|
@ -131,7 +131,7 @@ Item {
|
|||
Row {
|
||||
id: additionalComponentsRow
|
||||
anchors.top: parent.top
|
||||
anchors.right: saveToButton.visible ? saveToButton.left : (sliceButton.visible ? sliceButton.left : parent.right)
|
||||
anchors.right: saveToButton.visible ? saveToButton.left : (prepareButton.visible ? prepareButton.left : parent.right)
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
|
||||
spacing: UM.Theme.getSize("default_margin").width
|
||||
|
|
@ -159,14 +159,14 @@ Item {
|
|||
onPreferenceChanged:
|
||||
{
|
||||
var autoSlice = UM.Preferences.getValue("general/auto_slice");
|
||||
sliceButton.autoSlice = autoSlice;
|
||||
prepareButton.autoSlice = autoSlice;
|
||||
saveToButton.autoSlice = autoSlice;
|
||||
}
|
||||
}
|
||||
|
||||
// Slice button, only shows if auto_slice is off
|
||||
// Prepare button, only shows if auto_slice is off
|
||||
Button {
|
||||
id: sliceButton
|
||||
id: prepareButton
|
||||
|
||||
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
|
||||
|
|
@ -180,7 +180,7 @@ Item {
|
|||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
|
||||
// 1 = not started, 4 = error, 5 = disabled
|
||||
text: [1, 4, 5].indexOf(base.backendState) != -1 ? catalog.i18nc("@label:Printjob", "Slice") : catalog.i18nc("@label:Printjob", "Cancel")
|
||||
text: [1, 4, 5].indexOf(base.backendState) != -1 ? catalog.i18nc("@label:Printjob", "Prepare") : catalog.i18nc("@label:Printjob", "Cancel")
|
||||
onClicked:
|
||||
{
|
||||
sliceOrStopSlicing();
|
||||
|
|
|
|||
|
|
@ -148,9 +148,22 @@ UM.Dialog
|
|||
{
|
||||
height: childrenRect.height
|
||||
width: parent.width
|
||||
Label
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Extruder %1").arg(modelData)
|
||||
text: {
|
||||
var extruder = Number(modelData)
|
||||
var extruder_id = ""
|
||||
if(!isNaN(extruder))
|
||||
{
|
||||
extruder_id = extruder + 1 // The extruder counter start from One and not Zero
|
||||
}
|
||||
else
|
||||
{
|
||||
extruder_id = modelData
|
||||
}
|
||||
|
||||
return catalog.i18nc("@action:label", "Extruder %1").arg(extruder_id)
|
||||
}
|
||||
font.bold: true
|
||||
}
|
||||
Row
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue