diff options
author | Diego Prado Gesto <d.pradogesto@ultimaker.com> | 2017-09-28 14:21:03 +0300 |
---|---|---|
committer | Diego Prado Gesto <d.pradogesto@ultimaker.com> | 2017-09-28 14:21:03 +0300 |
commit | e3edc79a3ecd3cd4a5806b7133a0996367b8049e (patch) | |
tree | bb96e0cde92133ae7df6b6854f123cfe1f685b4b /cura | |
parent | 07899ba798393544fd5c3e38448e96e607ab4529 (diff) |
modified some code to fix the multiple extrusion issues - CURA-4379
Diffstat (limited to 'cura')
-rw-r--r-- | cura/Settings/QualityAndUserProfilesModel.py | 7 | ||||
-rw-r--r-- | cura/Settings/UserProfilesModel.py | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/cura/Settings/QualityAndUserProfilesModel.py b/cura/Settings/QualityAndUserProfilesModel.py index d0d0f2cae2..6289bf15f1 100644 --- a/cura/Settings/QualityAndUserProfilesModel.py +++ b/cura/Settings/QualityAndUserProfilesModel.py @@ -52,9 +52,12 @@ class QualityAndUserProfilesModel(ProfilesModel): if multiple_extrusion:
# 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:
# 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
diff --git a/cura/Settings/UserProfilesModel.py b/cura/Settings/UserProfilesModel.py index b9c9bef89f..6df100fb09 100644 --- a/cura/Settings/UserProfilesModel.py +++ b/cura/Settings/UserProfilesModel.py @@ -52,7 +52,7 @@ class UserProfilesModel(ProfilesModel): if multiple_extrusion:
# 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:
# 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]
|