diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 165a2a4feb..a8f4d841a4 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -102,7 +102,7 @@ from cura.TaskManagement.OnExitCallbackManager import OnExitCallbackManager from cura.Settings.MachineManager import MachineManager from cura.Settings.ExtruderManager import ExtruderManager from cura.Settings.UserChangesModel import UserChangesModel -from cura.Settings.ExtrudersModel import ExtrudersModel +from cura.UI.ExtrudersModel import ExtrudersModel from cura.Settings.MaterialSettingsVisibilityHandler import MaterialSettingsVisibilityHandler from cura.Settings.ContainerManager import ContainerManager from cura.Settings.SidebarCustomMenuItemsModel import SidebarCustomMenuItemsModel diff --git a/cura/Settings/ExtrudersModel.py b/cura/UI/ExtrudersModel.py similarity index 97% rename from cura/Settings/ExtrudersModel.py rename to cura/UI/ExtrudersModel.py index 93cc1ce402..9eee7f5f9e 100644 --- a/cura/Settings/ExtrudersModel.py +++ b/cura/UI/ExtrudersModel.py @@ -2,23 +2,25 @@ # Cura is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import Qt, pyqtSignal, pyqtProperty, QTimer -from typing import Iterable +from typing import Iterable, TYPE_CHECKING from UM.i18n import i18nCatalog -import UM.Qt.ListModel +from UM.Qt.ListModel import ListModel from UM.Application import Application import UM.FlameProfiler -from cura.Settings.ExtruderStack import ExtruderStack # To listen to changes on the extruders. +if TYPE_CHECKING: + from cura.Settings.ExtruderStack import ExtruderStack # To listen to changes on the extruders. catalog = i18nCatalog("cura") + ## Model that holds extruders. # # This model is designed for use by any list of extruders, but specifically # intended for drop-down lists of the current machine's extruders in place of # settings. -class ExtrudersModel(UM.Qt.ListModel.ListModel): +class ExtrudersModel(ListModel): # The ID of the container stack for the extruder. IdRole = Qt.UserRole + 1 diff --git a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py index 3cc23130ea..312de71e11 100644 --- a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py +++ b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py @@ -24,7 +24,7 @@ from cura import LayerPolygon import numpy from time import time -from cura.Settings.ExtrudersModel import ExtrudersModel +from cura.UI.ExtrudersModel import ExtrudersModel catalog = i18nCatalog("cura")