Quality changes can now only be removed if they are not in use anywere

CURA-2846
This commit is contained in:
Jaime van Kessel 2016-11-04 10:02:13 +01:00
parent 3d30762c41
commit 720f37b17f

View file

@ -261,8 +261,9 @@ class ContainerManager(QObject):
@pyqtSlot(str, result = bool) @pyqtSlot(str, result = bool)
def isContainerUsed(self, container_id): def isContainerUsed(self, container_id):
UM.Logger.log("d", "Checking if container %s is currently used in the active stacks", container_id) UM.Logger.log("d", "Checking if container %s is currently used", container_id)
for stack in cura.Settings.ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks(): containers = self._container_registry.findContainerStacks()
for stack in containers:
if container_id in [child.getId() for child in stack.getContainers()]: if container_id in [child.getId() for child in stack.getContainers()]:
UM.Logger.log("d", "The container is in use by %s", stack.getId()) UM.Logger.log("d", "The container is in use by %s", stack.getId())
return True return True