mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-14 06:13:14 +08:00
Prevent circular import
When this is imported during the __init__, it'll long have been imported elsewhere and won't need to import it again but still guarantees that it is actually imported if no other module does it first. Contributes to issue CURA-4024.
This commit is contained in:
parent
ee52e1b9ea
commit
012d299d98
@ -8,7 +8,6 @@ from typing import Any, Optional
|
||||
from PyQt5.QtCore import pyqtProperty, pyqtSignal, QObject
|
||||
from UM.FlameProfiler import pyqtSlot
|
||||
|
||||
import cura.CuraApplication #To get the setting version.
|
||||
from UM.Decorators import override
|
||||
from UM.Logger import Logger
|
||||
from UM.Settings.ContainerStack import ContainerStack, InvalidContainerStackError
|
||||
@ -48,6 +47,7 @@ class CuraContainerStack(ContainerStack):
|
||||
|
||||
self.containersChanged.connect(self._onContainersChanged)
|
||||
|
||||
import cura.CuraApplication #Here to prevent circular imports.
|
||||
self.addMetaDataEntry("setting_version", cura.CuraApplication.CuraApplication.SettingVersion)
|
||||
|
||||
# This is emitted whenever the containersChanged signal from the ContainerStack base class is emitted.
|
||||
|
Loading…
x
Reference in New Issue
Block a user