CURA-4457 Add parenthesis in conditional statement

This commit is contained in:
Diego Prado Gesto 2017-10-16 20:21:42 +02:00
parent f4718162d3
commit ac2484ea87

View file

@ -58,8 +58,8 @@ class QualityAndUserProfilesModel(ProfilesModel):
# 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 filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set and
qc.getMetaDataEntry("extruder") is not None and qc.getMetaDataEntry("extruder") is not None and
qc.getMetaDataEntry("extruder") == active_extruder.definition.getMetaDataEntry("quality_definition") or (qc.getMetaDataEntry("extruder") == active_extruder.definition.getMetaDataEntry("quality_definition") or
qc.getMetaDataEntry("extruder") == active_extruder.definition.getId()] 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 filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set and