diff --git a/cura/Machines/Models/CustomQualityProfilesDropDownMenuModel.py b/cura/Machines/Models/CustomQualityProfilesDropDownMenuModel.py index 3ade02120d..8fe9b26517 100644 --- a/cura/Machines/Models/CustomQualityProfilesDropDownMenuModel.py +++ b/cura/Machines/Models/CustomQualityProfilesDropDownMenuModel.py @@ -7,10 +7,12 @@ import cura.CuraApplication # Imported this way to prevent circular references. from cura.Machines.ContainerTree import ContainerTree from cura.Machines.Models.QualityProfilesDropDownMenuModel import QualityProfilesDropDownMenuModel + ## This model is used for the custom profile items in the profile drop down # menu. class CustomQualityProfilesDropDownMenuModel(QualityProfilesDropDownMenuModel): - def _update(self): + + def _update(self) -> None: Logger.log("d", "Updating {model_class_name}.".format(model_class_name = self.__class__.__name__)) active_global_stack = cura.CuraApplication.CuraApplication.getInstance().getMachineManager().activeMachine @@ -31,4 +33,4 @@ class CustomQualityProfilesDropDownMenuModel(QualityProfilesDropDownMenuModel): item_list.append(item) - self.setItems(item_list) \ No newline at end of file + self.setItems(item_list) diff --git a/cura/Machines/QualityChangesGroup.py b/cura/Machines/QualityChangesGroup.py index 65ebb71f4c..f2bb0f737d 100644 --- a/cura/Machines/QualityChangesGroup.py +++ b/cura/Machines/QualityChangesGroup.py @@ -10,7 +10,8 @@ from typing import Any, Dict, Optional # contains an instance container for the global stack and one instance # container per extruder. class QualityChangesGroup(QObject): - def __init__(self, name: str, quality_type: str, intent_category: str, parent = None) -> None: + + def __init__(self, name: str, quality_type: str, intent_category: str, parent: Optional["QObject"] = None) -> None: super().__init__(parent) self.name = name self.quality_type = quality_type diff --git a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml index cff4e3e7a6..2d5f880344 100644 --- a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml +++ b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml @@ -103,7 +103,7 @@ Popup text: model.name + " - " + model.layer_height + " mm" checked: { - if(Cura.MachineManager.hasCustomQuality) + if (Cura.MachineManager.hasCustomQuality) { // When user created profile is active, no quality tickbox should be active. return false;