Fix unit test due to QualityGroup parent changes

This commit is contained in:
Lipu Fei 2019-10-01 11:20:24 +02:00
parent 961e1e0d7e
commit bc524b2c14
4 changed files with 28 additions and 21 deletions

View file

@ -29,14 +29,6 @@ class QualityGroup(QObject):
def __init__(self, name: str, quality_type: str, parent: Optional["QObject"] = None) -> None:
super().__init__(parent)
# CURA-6599
# Same as QualityChangesGroup.
# For some reason, QML will get null or fail to convert type for MachineManager.activeQualityChangesGroup() to
# a QObject. Setting the object ownership to QQmlEngine.CppOwnership doesn't work, but setting the object
# parent to application seems to work.
from cura.CuraApplication import CuraApplication
self.setParent(CuraApplication.getInstance())
self.name = name
self.node_for_global = None # type: Optional[ContainerNode]
self.nodes_for_extruders = {} # type: Dict[int, ContainerNode]