mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 21:58:01 -06:00
CURA-5330 Add typing in CuraContainerRegistry and
QualityProfilesDropDownMenuModel
This commit is contained in:
parent
7f34d7615e
commit
2dfedf3ae4
2 changed files with 3 additions and 1 deletions
|
@ -83,7 +83,7 @@ class QualityProfilesDropDownMenuModel(ListModel):
|
|||
|
||||
self.setItems(item_list)
|
||||
|
||||
def _fetchLayerHeight(self, quality_group: "QualityGroup"):
|
||||
def _fetchLayerHeight(self, quality_group: "QualityGroup") -> float:
|
||||
global_stack = self._machine_manager.activeMachine
|
||||
if not self._layer_height_unit:
|
||||
unit = global_stack.definition.getProperty("layer_height", "unit")
|
||||
|
|
|
@ -356,6 +356,8 @@ class CuraContainerRegistry(ContainerRegistry):
|
|||
return catalog.i18nc("@info:status", "Profile is missing a quality type.")
|
||||
|
||||
global_stack = Application.getInstance().getGlobalContainerStack()
|
||||
if global_stack is None:
|
||||
return None
|
||||
definition_id = getMachineDefinitionIDForQualitySearch(global_stack.definition)
|
||||
profile.setDefinition(definition_id)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue