mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-10 23:35:07 -06:00
Merge branch '15.06'
* 15.06: Do not cause "dictionary changed size during iteration" errors when changing view Adds an idle-state for the layerview slider Adds an idle-state for the safebutton Sets the platform activity on true when a model is loaded Sets the platform activity on true when a model is loaded Create functions that get & set platform activity Send M104 to set the temperature to 0 Do not store files that fail to load in recent files
This commit is contained in:
commit
89b175bc5c
7 changed files with 52 additions and 16 deletions
|
@ -41,7 +41,10 @@ UM.MainWindow {
|
|||
var path = modelData.toString()
|
||||
return (index + 1) + ". " + path.slice(path.lastIndexOf("/") + 1);
|
||||
}
|
||||
onTriggered: UM.MeshFileHandler.readLocalFile(modelData);
|
||||
onTriggered: {
|
||||
UM.MeshFileHandler.readLocalFile(modelData);
|
||||
Printer.setPlatformActivity(true)
|
||||
}
|
||||
}
|
||||
onObjectAdded: fileMenu.insertItem(index, object)
|
||||
onObjectRemoved: fileMenu.removeItem(object)
|
||||
|
@ -318,7 +321,11 @@ UM.MainWindow {
|
|||
redo.onTriggered: UM.OperationStack.redo();
|
||||
redo.enabled: UM.OperationStack.canRedo;
|
||||
|
||||
deleteSelection.onTriggered: UM.Controller.removeSelection();
|
||||
deleteSelection.onTriggered: {
|
||||
if(objectContextMenu.objectId != 0) {
|
||||
Printer.deleteObject(objectContextMenu.objectId);
|
||||
}
|
||||
}
|
||||
|
||||
deleteObject.onTriggered: {
|
||||
if(objectContextMenu.objectId != 0) {
|
||||
|
@ -408,6 +415,7 @@ UM.MainWindow {
|
|||
onAccepted:
|
||||
{
|
||||
UM.MeshFileHandler.readLocalFile(fileUrl)
|
||||
Printer.setPlatformActivity(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ Rectangle {
|
|||
property Action saveAction;
|
||||
|
||||
property real progress: UM.Backend.progress;
|
||||
property bool activity: Printer.getPlatformActivity;
|
||||
Behavior on progress { NumberAnimation { duration: 250; } }
|
||||
|
||||
property string currentDevice: "local_file"
|
||||
|
@ -76,7 +77,7 @@ Rectangle {
|
|||
color: UM.Theme.colors.save_button_estimated_text;
|
||||
font: UM.Theme.fonts.small;
|
||||
text:
|
||||
if(base.progress < 0) {
|
||||
if(base.activity == false) {
|
||||
//: Save button label
|
||||
return qsTr("Please load a 3D model");
|
||||
} else if (base.progress < 0.99) {
|
||||
|
@ -97,7 +98,7 @@ Rectangle {
|
|||
anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width;
|
||||
color: UM.Theme.colors.save_button_printtime_text;
|
||||
font: UM.Theme.fonts.small;
|
||||
visible: base.progress < 0.99 ? false : true
|
||||
visible: base.activity == false || base.progress < 0.99 ? false : true
|
||||
text: (!base.printDuration || !base.printDuration.valid) ? "" : base.printDuration.getDisplayString(UM.DurationFormat.Long);
|
||||
}
|
||||
Label {
|
||||
|
@ -107,11 +108,10 @@ Rectangle {
|
|||
anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width;
|
||||
color: base.printDuration.days > 0 ? UM.Theme.colors.save_button_estimated_text : UM.Theme.colors.save_button_printtime_text;
|
||||
font: UM.Theme.fonts.small;
|
||||
|
||||
property bool mediumLengthDuration: base.printDuration.hours > 9 && base.printMaterialAmount > 9.99 && base.printDuration.days == 0
|
||||
width: mediumLengthDuration ? 50 : undefined
|
||||
elide: mediumLengthDuration ? Text.ElideRight : Text.ElideNone
|
||||
visible: base.progress < 0.99 ? false : true
|
||||
visible: base.activity == false || base.progress < 0.99 ? false : true
|
||||
//: Print material amount save button label
|
||||
text: base.printMaterialAmount < 0 ? "" : qsTr("%1m material").arg(base.printMaterialAmount);
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ Rectangle {
|
|||
}
|
||||
width: Math.max(infoBox.width * base.progress);
|
||||
color: UM.Theme.colors.save_button_active
|
||||
visible: base.progress > 0.99 ? false : true
|
||||
visible: progress > 0.99 ? false : true
|
||||
}
|
||||
|
||||
Button {
|
||||
|
@ -135,7 +135,7 @@ Rectangle {
|
|||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
|
||||
tooltip: ''
|
||||
enabled: progress >= 0.99;
|
||||
enabled: progress > 0.99 && base.activity == true
|
||||
|
||||
width: infoBox.width/6*4.5
|
||||
height: UM.Theme.sizes.save_button_save_to_button.height
|
||||
|
|
|
@ -389,7 +389,7 @@ QtObject {
|
|||
}
|
||||
Label {
|
||||
id: maxValueLabel
|
||||
visible: UM.LayerView.getLayerActivity ? true : false
|
||||
visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false
|
||||
text: control.maximumValue + 1
|
||||
font: control.maximumValue > 998 ? UM.Theme.fonts.small : UM.Theme.fonts.default
|
||||
transformOrigin: Item.BottomLeft
|
||||
|
@ -399,7 +399,7 @@ QtObject {
|
|||
}
|
||||
Label {
|
||||
id: minValueLabel
|
||||
visible: UM.LayerView.getLayerActivity ? true : false
|
||||
visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false
|
||||
text: '1'
|
||||
font: control.maximumValue > 998 ? UM.Theme.fonts.small : UM.Theme.fonts.default
|
||||
transformOrigin: Item.BottomLeft
|
||||
|
@ -416,7 +416,7 @@ QtObject {
|
|||
Behavior on color { ColorAnimation { duration: 50; } }
|
||||
Label {
|
||||
id: valueLabel
|
||||
visible: UM.LayerView.getLayerActivity ? true : false
|
||||
visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false
|
||||
text: control.value + 1
|
||||
anchors.bottom: layerSliderControl.bottom
|
||||
anchors.right: layerSliderControl.left
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue