mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 22:09:04 +08:00
Merge branch 'master' of ssh://github.com/Ultimaker/Cura
This commit is contained in:
commit
94f1749d58
@ -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(
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user