mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Added missing cast to getMachine
This commit is contained in:
parent
e6512e748c
commit
a436d5e0bf
1 changed files with 2 additions and 3 deletions
|
|
@ -38,11 +38,10 @@ from .CuraStackBuilder import CuraStackBuilder
|
|||
|
||||
from UM.i18n import i18nCatalog
|
||||
catalog = i18nCatalog("cura")
|
||||
|
||||
from cura.Settings.GlobalStack import GlobalStack
|
||||
if TYPE_CHECKING:
|
||||
from cura.CuraApplication import CuraApplication
|
||||
from cura.Settings.CuraContainerStack import CuraContainerStack
|
||||
from cura.Settings.GlobalStack import GlobalStack
|
||||
from cura.Machines.MaterialManager import MaterialManager
|
||||
from cura.Machines.QualityManager import QualityManager
|
||||
from cura.Machines.VariantManager import VariantManager
|
||||
|
|
@ -388,7 +387,7 @@ class MachineManager(QObject):
|
|||
machines = CuraContainerRegistry.getInstance().findContainerStacks(type = "machine", **metadata_filter)
|
||||
for machine in machines:
|
||||
if machine.definition.getId() == definition_id:
|
||||
return machine
|
||||
return cast(GlobalStack, machine)
|
||||
return None
|
||||
|
||||
@pyqtSlot(str)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue