From ade1c039ea3d0658158bcc273d20f4712e816da2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 20 Sep 2017 11:03:20 +0200 Subject: [PATCH 1/6] Print information not being set won't cause crash anymore --- plugins/CuraEngineBackend/CuraEngineBackend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index dd5b182607..cb7d333cde 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -195,8 +195,8 @@ class CuraEngineBackend(QObject, Backend): self.backendStateChange.emit(BackendState.Done) Logger.log("w", "Slice unnecessary, nothing has changed that needs reslicing.") return - - Application.getInstance().getPrintInformation().setToZeroPrintInformation() + if Application.getInstance().getPrintInformation(): + Application.getInstance().getPrintInformation().setToZeroPrintInformation() self._stored_layer_data = [] self._stored_optimized_layer_data = [] From b434fdb875127bc999523b3ab5c8eee02b230b1e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 20 Sep 2017 13:35:13 +0200 Subject: [PATCH 2/6] Layerview scrollbar now has fixed size. Instead of using the size of the other items. This worked when the bar was still part of the larger view, but since it's now below the item it broke it. CURA-4342 --- plugins/LayerView/LayerView.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/LayerView/LayerView.qml b/plugins/LayerView/LayerView.qml index 274b5c695c..21032be6ea 100755 --- a/plugins/LayerView/LayerView.qml +++ b/plugins/LayerView/LayerView.qml @@ -342,7 +342,7 @@ Item { id: slider width: handleSize - height: parent.height - 2*UM.Theme.getSize("slider_layerview_margin").height + height: UM.Theme.getSize("layerview_menu_size").height anchors.top: parent.bottom anchors.topMargin: UM.Theme.getSize("slider_layerview_margin").height anchors.right: layerViewMenu.right From 4d99fb067f3f9a9187121cc67dd41a8b8a29ba7b Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Wed, 20 Sep 2017 17:19:44 +0200 Subject: [PATCH 3/6] After disconnect a signal, now is reconnected the correct one - CURA-4327 --- cura/Settings/MachineManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 4fb700e5ea..e807e49200 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -965,7 +965,7 @@ class MachineManager(QObject): if container_type == "quality": stack.quality.nameChanged.disconnect(self._onQualityNameChanged) stack.setQuality(container, postpone_emit = postpone_emit) - stack.qualityChanges.nameChanged.connect(self._onQualityNameChanged) + stack.quality.nameChanged.connect(self._onQualityNameChanged) elif container_type == "quality_changes" or container_type is None: # If the container is an empty container, we need to change the quality_changes. # Quality can never be set to empty. From cdc1b9ba66c17301b57a2918fb09956d383b5392 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Thu, 21 Sep 2017 14:28:22 +0200 Subject: [PATCH 4/6] CURA-4303 infill slider icon color, border, alignment --- resources/qml/SidebarSimple.qml | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 9bd5c7590a..f3202d0e63 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -509,21 +509,23 @@ Item } } - Item + Rectangle { id: infillIcon - width: (infillCellRight.width / 5) - (UM.Theme.getSize("sidebar_margin").width) + width: (parent.width / 5) - (UM.Theme.getSize("sidebar_margin").width) height: width - anchors.right: infillCellRight.right - anchors.top: infillSlider.top + anchors.right: parent.right + anchors.top: parent.top + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height / 2 // we loop over all density icons and only show the one that has the current density and steps Repeater { id: infillIconList model: infillModel + anchors.fill: parent property int activeIndex: { for (var i = 0; i < infillModel.count; i++) { @@ -541,20 +543,21 @@ Item return -1 } - Item { + Rectangle + { anchors.fill: parent + visible: infillIconList.activeIndex == index - Rectangle { + border.width: UM.Theme.getSize("default_lining").width + border.color: UM.Theme.getColor("quality_slider_available") + + UM.RecolorImage { anchors.fill: parent - visible: infillIconList.activeIndex == index - - UM.RecolorImage { - anchors.fill: parent - sourceSize.width: width - sourceSize.height: width - source: UM.Theme.getIcon(model.icon) - color: UM.Theme.getColor("quality_slider_available") - } + anchors.margins: 2 + sourceSize.width: width + sourceSize.height: width + source: UM.Theme.getIcon(model.icon) + color: UM.Theme.getColor("quality_slider_unavailable") } } } From ddfb5f0b48446fff8d5bb037bbb6f9b9b7892928 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Thu, 21 Sep 2017 15:09:04 +0200 Subject: [PATCH 5/6] fix conflict after revert --- plugins/3MFReader/ThreeMFReader.py | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index a19005057c..93a8dc1c65 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -12,7 +12,6 @@ from UM.Mesh.MeshBuilder import MeshBuilder from UM.Mesh.MeshReader import MeshReader from UM.Scene.GroupDecorator import GroupDecorator from cura.Settings.SettingOverrideDecorator import SettingOverrideDecorator -from cura.ZOffsetDecorator import ZOffsetDecorator from UM.Application import Application from cura.Settings.ExtruderManager import ExtruderManager from cura.QualityManager import QualityManager @@ -47,7 +46,7 @@ class ThreeMFReader(MeshReader): def _createMatrixFromTransformationString(self, transformation): if transformation == "": return Matrix() - + splitted_transformation = transformation.split() ## Transformation is saved as: ## M00 M01 M02 0.0 @@ -105,8 +104,8 @@ class ThreeMFReader(MeshReader): # Add the setting override decorator, so we can add settings to this node. if settings: um_node.addDecorator(SettingOverrideDecorator()) - global_container_stack = Application.getInstance().getGlobalContainerStack() + global_container_stack = Application.getInstance().getGlobalContainerStack() # Ensure the correct next container for the SettingOverride decorator is set. if global_container_stack: multi_extrusion = global_container_stack.getProperty("machine_extruder_count", "value") > 1 @@ -144,15 +143,12 @@ class ThreeMFReader(MeshReader): if len(um_node.getChildren()) > 0: group_decorator = GroupDecorator() um_node.addDecorator(group_decorator) - um_node.setSelectable(True) - if um_node.getMeshData(): # Assuming that all nodes with mesh data are printable objects # affects (auto) slicing sliceable_decorator = SliceableObjectDecorator() um_node.addDecorator(sliceable_decorator) - return um_node def read(self, file_name): @@ -172,18 +168,10 @@ class ThreeMFReader(MeshReader): transform_matrix = Matrix() mesh_data = um_node.getMeshData() - if mesh_data is not None: extents = mesh_data.getExtents() center_vector = Vector(extents.center.x, extents.center.y, extents.center.z) - - # If the object in a saved project is below the bed, keep it that way - if extents.minimum.z < 0.0: - um_node.addDecorator(ZOffsetDecorator()) - um_node.callDecoration("setZOffset", extents.minimum.z) - transform_matrix.setByTranslation(center_vector) - transform_matrix.multiply(um_node.getLocalTransformation()) um_node.setTransformation(transform_matrix) @@ -207,7 +195,7 @@ class ThreeMFReader(MeshReader): translation_matrix.setByTranslation(translation_vector) transformation_matrix.multiply(translation_matrix) - # Third step: 3MF also defines a unit, whereas Cura always assumes mm. + # Third step: 3MF also defines a unit, wheras Cura always assumes mm. scale_matrix = Matrix() scale_matrix.setByScaleVector(self._getScaleFromUnit(self._unit)) transformation_matrix.multiply(scale_matrix) From 78987ba666c332920d7fea098a5388e342b099b6 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 21 Sep 2017 15:19:00 +0200 Subject: [PATCH 6/6] When tool icon can not be found in theme, try to find it in the plugin folder CURA-4345 --- resources/qml/Toolbar.qml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index 0903c0555b..bc7905c527 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -34,7 +34,15 @@ Item Button { text: model.name - iconSource: UM.Theme.getIcon(model.icon); + iconSource: + { + var result = UM.Theme.getIcon(model.icon) + if(result == "") + { + return model.location + "/" + model.icon + } + return result + } checkable: true; checked: model.active;