Merge branch 'master' of ssh://github.com/Ultimaker/Cura

This commit is contained in:
Ghostkeeper 2019-10-10 13:53:40 +02:00
commit 94f1749d58
No known key found for this signature in database
GPG Key ID: 86BEF881AE2CF276
3 changed files with 7 additions and 3 deletions

View File

@ -84,7 +84,7 @@ class VariantNode(ContainerNode):
return material_node
# First fallback: Choose any material with matching diameter.
for material_node in self.materials.values():
if approximate_diameter == int(material_node.getMetaDataEntry("approximate_diameter")):
if material_node.getMetaDataEntry("approximate_diameter") and approximate_diameter == int(material_node.getMetaDataEntry("approximate_diameter")):
return material_node
fallback = next(iter(self.materials.values())) # Should only happen with empty material node.
Logger.log("w", "Could not find preferred material {preferred_material} with diameter {diameter} for variant {variant_id}, falling back to {fallback}.".format(

View File

@ -619,7 +619,10 @@ class MachineManager(QObject):
global_container_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
if not global_container_stack:
return False
return self.activeQualityGroup().is_experimental
active_quality_group = self.activeQualityGroup()
if active_quality_group is None:
return False
return active_quality_group.is_experimental
@pyqtProperty(str, notify = activeIntentChanged)
def activeIntentCategory(self) -> str:
@ -1431,6 +1434,8 @@ class MachineManager(QObject):
else:
machine_node = ContainerTree.getInstance().machines.get(self._global_container_stack.definition.getId())
variant_node = machine_node.variants.get(extruder_configuration.hotendID)
if variant_node is None:
continue
self._setVariantNode(position, variant_node)
# Find the material profile that the printer has stored.

View File

@ -87,7 +87,6 @@ class XmlMaterialProfile(InstanceContainer):
container.metaDataChanged.emit(container)
for k, v in new_setting_values_dict.items():
self.setProperty(k, "value", v)
return
## Overridden from InstanceContainer, similar to setMetaDataEntry.
# without this function the setName would only set the name of the specific nozzle / material / machine combination container