Browse Source

Scouting: Try not to spam signals or errors as much.

nominally part of CURA-6863
Remco Burema 5 years ago
parent
commit
09dc6ae44a

+ 4 - 3
cura/PrinterOutput/Models/ExtruderConfigurationModel.py

@@ -25,9 +25,10 @@ class ExtruderConfigurationModel(QObject):
         return self._position
 
     def setMaterial(self, material: Optional[MaterialOutputModel]) -> None:
-        if self._material != material:
-            self._material = material
-            self.extruderConfigurationChanged.emit()
+        if material is None or self._material == material:
+            return
+        self._material = material
+        self.extruderConfigurationChanged.emit()
 
     @pyqtProperty(QObject, fset = setMaterial, notify = extruderConfigurationChanged)
     def activeMaterial(self) -> Optional[MaterialOutputModel]:

+ 1 - 0
resources/qml/Preferences/Materials/MaterialsTypeSection.qml

@@ -21,6 +21,7 @@ Item
     property var colorsModel: materialType != null ? materialType.colors: null
     height: childrenRect.height
     width: parent.width
+    anchors.left: parent.left
     Rectangle
     {
         id: material_type_header_background