From d8f8f3f77e7c9949d9f5391e31783b97a1d0e34a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 10 Jul 2018 15:36:19 +0200 Subject: [PATCH] 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. --- cura/Machines/Models/BaseMaterialsModel.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cura/Machines/Models/BaseMaterialsModel.py b/cura/Machines/Models/BaseMaterialsModel.py index 03763e9a51..f21474bd33 100644 --- a/cura/Machines/Models/BaseMaterialsModel.py +++ b/cura/Machines/Models/BaseMaterialsModel.py @@ -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")