From 8cd943949792152796859b55b84b56afeb2fc68f Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Fri, 8 Dec 2017 14:33:21 +0100 Subject: [PATCH] ignore octoprint plugin --- .gitignore | 1 + resources/qml/MonitorButton.qml | 2 +- resources/qml/SaveButton.qml | 22 +++++++++++----------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 7284597fa9..8d9ba4b2d2 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ plugins/cura-siemensnx-plugin plugins/CuraVariSlicePlugin plugins/CuraLiveScriptingPlugin plugins/CuraPrintProfileCreator +plugins/OctoPrintPlugin #Build stuff CMakeCache.txt diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index 29b00f50e6..87eceb69cd 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -18,7 +18,6 @@ Item property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0 property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands property real progress: printerConnected ? Cura.MachineManager.printerOutputDevices[0].progress : 0 - property int backendState: UM.Backend.state property bool showProgress: { // determine if we need to show the progress bar + percentage @@ -203,6 +202,7 @@ Item target: Printer onAdditionalComponentsChanged: { + print("areaId", areaId) if(areaId == "monitorButtons") { for (var component in CuraApplication.additionalComponents["monitorButtons"]) { CuraApplication.additionalComponents["monitorButtons"][component].parent = additionalComponentsRow diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 390b868a9b..25bc10d122 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -28,6 +28,10 @@ Item { return catalog.i18nc("@label:PrintjobStatus", "Please load a 3D model"); } + if (base.backendState == "undefined") { + return "" + } + switch(base.backendState) { case 1: @@ -81,7 +85,7 @@ Item { height: parent.height color: UM.Theme.getColor("progressbar_control") radius: UM.Theme.getSize("progressbar_radius").width - visible: base.backendState == 2 ? true : false + visible: (base.backendState != "undefined" && base.backendState == 2) ? true : false } } @@ -159,10 +163,8 @@ Item { tooltip: [1, 5].indexOf(UM.Backend.state) != -1 ? catalog.i18nc("@info:tooltip","Slice current printjob") : catalog.i18nc("@info:tooltip","Cancel slicing process") // 1 = not started, 2 = Processing - enabled: (base.backendState == 1 || base.backendState == 2) && base.activity == true - visible: { - return !autoSlice && (base.backendState == 1 || base.backendState == 2) && base.activity == true; - } + enabled: base.backendState != "undefined" && (base.backendState == 1 || base.backendState == 2) && base.activity == true + visible: base.backendState != "undefined" && !autoSlice && (base.backendState == 1 || base.backendState == 2) && base.activity == true property bool autoSlice height: UM.Theme.getSize("save_button_save_to_button").height @@ -235,10 +237,8 @@ Item { tooltip: UM.OutputDeviceManager.activeDeviceDescription; // 3 = done, 5 = disabled - enabled: (base.backendState == 3 || base.backendState == 5) && base.activity == true - visible: { - return autoSlice || ((base.backendState == 3 || base.backendState == 5) && base.activity == true); - } + enabled: base.backendState != "undefined" && (base.backendState == 3 || base.backendState == 5) && base.activity == true + visible: base.backendState != "undefined" && autoSlice || ((base.backendState == 3 || base.backendState == 5) && base.activity == true) property bool autoSlice height: UM.Theme.getSize("save_button_save_to_button").height @@ -315,8 +315,8 @@ Item { width: UM.Theme.getSize("save_button_save_to_button").height height: UM.Theme.getSize("save_button_save_to_button").height // 3 = Done, 5 = Disabled - enabled: (base.backendState == 3 || base.backendState == 5) && base.activity == true - visible: (devicesModel.deviceCount > 1) && (base.backendState == 3 || base.backendState == 5) && base.activity == true + enabled: base.backendState != "undefined" && (base.backendState == 3 || base.backendState == 5) && base.activity == true + visible: base.backendState != "undefined" && (devicesModel.deviceCount > 1) && (base.backendState == 3 || base.backendState == 5) && base.activity == true style: ButtonStyle {