mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-22 04:29:01 +08:00
Fix type of self._application
Since the function is now typed, it actually checks for this. UM.Application has no function getMachineManager. cura.CuraApplication does. Contributes to issue CURA-5460.
This commit is contained in:
parent
f603b4c426
commit
d8f8f3f77e
@ -1,9 +1,9 @@
|
||||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from PyQt5.QtCore import Qt, pyqtSignal, pyqtProperty
|
||||
from PyQt5.QtCore import QObject, Qt, pyqtSignal, pyqtProperty
|
||||
|
||||
from UM.Application import Application
|
||||
from cura.CuraApplication import CuraApplication
|
||||
from UM.Qt.ListModel import ListModel
|
||||
|
||||
|
||||
@ -24,9 +24,9 @@ class BaseMaterialsModel(ListModel):
|
||||
|
||||
extruderPositionChanged = pyqtSignal()
|
||||
|
||||
def __init__(self, parent = None) -> None:
|
||||
def __init__(self, parent: QObject = None) -> None:
|
||||
super().__init__(parent)
|
||||
self._application = Application.getInstance()
|
||||
self._application = CuraApplication.getInstance()
|
||||
self._machine_manager = self._application.getMachineManager()
|
||||
|
||||
self.addRoleName(self.RootMaterialIdRole, "root_material_id")
|
||||
|
Loading…
x
Reference in New Issue
Block a user