From 720f37b17feed04826916a3dcd790bfc18fd5dc3 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 4 Nov 2016 10:02:13 +0100 Subject: [PATCH] Quality changes can now only be removed if they are not in use anywere CURA-2846 --- cura/Settings/ContainerManager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index a51f9823cc..fa32b67845 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -261,8 +261,9 @@ class ContainerManager(QObject): @pyqtSlot(str, result = bool) def isContainerUsed(self, container_id): - UM.Logger.log("d", "Checking if container %s is currently used in the active stacks", container_id) - for stack in cura.Settings.ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks(): + UM.Logger.log("d", "Checking if container %s is currently used", container_id) + containers = self._container_registry.findContainerStacks() + for stack in containers: if container_id in [child.getId() for child in stack.getContainers()]: UM.Logger.log("d", "The container is in use by %s", stack.getId()) return True