mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 20:55:54 +08:00
Directly use CuraApplication.backend instead of via property
This commit is contained in:
parent
b6f6ee2f31
commit
876ad01597
@ -14,7 +14,6 @@ Item {
|
|||||||
|
|
||||||
property real progress: UM.Backend.progress
|
property real progress: UM.Backend.progress
|
||||||
property int backendState: UM.Backend.state
|
property int backendState: UM.Backend.state
|
||||||
property var backend: CuraApplication.backend
|
|
||||||
property bool activity: CuraApplication.platformActivity
|
property bool activity: CuraApplication.platformActivity
|
||||||
|
|
||||||
property alias buttonRowWidth: saveRow.width
|
property alias buttonRowWidth: saveRow.width
|
||||||
@ -50,12 +49,10 @@ Item {
|
|||||||
|
|
||||||
function sliceOrStopSlicing() {
|
function sliceOrStopSlicing() {
|
||||||
try {
|
try {
|
||||||
if (base.backendState != "undefined" && base.backend != "undefined") {
|
|
||||||
if ([1, 5].indexOf(base.backendState) != -1) {
|
if ([1, 5].indexOf(base.backendState) != -1) {
|
||||||
backend.forceSlice();
|
CuraApplication.backend.forceSlice();
|
||||||
} else {
|
} else {
|
||||||
backend.stopSlicing();
|
CuraApplication.backend.stopSlicing();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('Could not start or stop slicing', e)
|
console.log('Could not start or stop slicing', e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user