mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue