mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 21:58:01 -06:00
We now remove all material containers instead of the active machine variant
CURA-2210
This commit is contained in:
parent
4d84584f59
commit
e12acb8110
1 changed files with 8 additions and 1 deletions
|
@ -242,7 +242,14 @@ UM.ManagementPage
|
|||
object: base.currentItem != null ? base.currentItem.name : ""
|
||||
onYes:
|
||||
{
|
||||
var containers = Cura.ContainerManager.findInstanceContainers({"id": base.currentItem.id})
|
||||
// A material container can actually be multiple items, so we need to find (and remove) all of them.
|
||||
var base_file = Cura.ContainerManager.getContainerMetaDataEntry(base.currentItem.id, "base_file")
|
||||
if(base_file == "")
|
||||
{
|
||||
base_file = base.currentItem.id
|
||||
}
|
||||
var guid = Cura.ContainerManager.getContainerMetaDataEntry(base.currentItem.id, "GUID")
|
||||
var containers = Cura.ContainerManager.findInstanceContainers({"GUID": guid, "base_file": base_file, "type": "material"})
|
||||
for(var i in containers)
|
||||
{
|
||||
Cura.ContainerManager.removeContainer(containers[i])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue