mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
modified some code to fix the multiple extrusion issues - CURA-4379
This commit is contained in:
parent
07899ba798
commit
e3edc79a3e
4 changed files with 9 additions and 6 deletions
|
@ -52,9 +52,12 @@ class QualityAndUserProfilesModel(ProfilesModel):
|
||||||
|
|
||||||
if multiple_extrusion:
|
if multiple_extrusion:
|
||||||
# If the printer has multiple extruders then quality changes related to the current extruder are kept
|
# If the printer has multiple extruders then quality changes related to the current extruder are kept
|
||||||
filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set and qc.getMetaDataEntry("extruder") == active_extruder.definition.getId()]
|
filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set and
|
||||||
|
qc.getMetaDataEntry("extruder") == active_extruder.definition.getMetaDataEntry("quality_definition") or
|
||||||
|
qc.getMetaDataEntry("extruder") == active_extruder.definition.getId()]
|
||||||
else:
|
else:
|
||||||
# If not, the quality changes of the global stack are selected
|
# If not, the quality changes of the global stack are selected
|
||||||
filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set and qc.getMetaDataEntry("extruder") is None]
|
filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set and
|
||||||
|
qc.getMetaDataEntry("extruder") is None]
|
||||||
|
|
||||||
return quality_list + filtered_quality_changes
|
return quality_list + filtered_quality_changes
|
||||||
|
|
|
@ -52,7 +52,7 @@ class UserProfilesModel(ProfilesModel):
|
||||||
|
|
||||||
if multiple_extrusion:
|
if multiple_extrusion:
|
||||||
# If the printer has multiple extruders then quality changes related to the current extruder are kept
|
# If the printer has multiple extruders then quality changes related to the current extruder are kept
|
||||||
filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set and qc.getMetaDataEntry("extruder") == active_extruder.definition.getId()]
|
filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set and qc.getMetaDataEntry("extruder") == active_extruder.definition.getMetaDataEntry("quality_definition")]
|
||||||
else:
|
else:
|
||||||
# If not, the quality changes of the global stack are selected
|
# If not, the quality changes of the global stack are selected
|
||||||
filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set and qc.getMetaDataEntry("extruder") is None]
|
filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set and qc.getMetaDataEntry("extruder") is None]
|
||||||
|
|
|
@ -176,7 +176,6 @@ class MachineSettingsAction(MachineAction):
|
||||||
node.callDecoration("setActiveExtruder", extruder_manager.getExtruderStack(extruder_count - 1).getId())
|
node.callDecoration("setActiveExtruder", extruder_manager.getExtruderStack(extruder_count - 1).getId())
|
||||||
|
|
||||||
definition_changes_container.setProperty("machine_extruder_count", "value", extruder_count)
|
definition_changes_container.setProperty("machine_extruder_count", "value", extruder_count)
|
||||||
self.forceUpdate()
|
|
||||||
|
|
||||||
if extruder_count > 1:
|
if extruder_count > 1:
|
||||||
# Multiextrusion
|
# Multiextrusion
|
||||||
|
@ -220,6 +219,7 @@ class MachineSettingsAction(MachineAction):
|
||||||
machine_manager.setActiveVariant(extruder_variant_id)
|
machine_manager.setActiveVariant(extruder_variant_id)
|
||||||
|
|
||||||
preferences.setValue("cura/choice_on_profile_override", choice_on_profile_override)
|
preferences.setValue("cura/choice_on_profile_override", choice_on_profile_override)
|
||||||
|
self.forceUpdate()
|
||||||
|
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
|
|
|
@ -94,8 +94,8 @@ Column
|
||||||
onGlobalContainerChanged:
|
onGlobalContainerChanged:
|
||||||
{
|
{
|
||||||
forceActiveFocus() // Changing focus applies the currently-being-typed values so it can change the displayed setting values.
|
forceActiveFocus() // Changing focus applies the currently-being-typed values so it can change the displayed setting values.
|
||||||
var extruder_index = (machineExtruderCount.properties.value == 1) ? -1 : 0
|
// var extruder_index = (machineExtruderCount.properties.value == 1) ? -1 : 0
|
||||||
ExtruderManager.setActiveExtruderIndex(extruder_index);
|
// ExtruderManager.setActiveExtruderIndex(extruder_index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue