mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06:00
Merge branch 'feature_local_container_server'
This commit is contained in:
commit
75df653d47
112 changed files with 689 additions and 609 deletions
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2016 Ultimaker B.V.
|
||||
// Copyright (c) 2017 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
|
@ -157,7 +157,7 @@ Menu
|
|||
}
|
||||
|
||||
//: Model used to populate the brandModel
|
||||
UM.InstanceContainersModel
|
||||
Cura.MaterialsModel
|
||||
{
|
||||
id: materialsModel
|
||||
filter: materialFilter()
|
||||
|
|
|
@ -41,7 +41,7 @@ TabView
|
|||
|
||||
Tab
|
||||
{
|
||||
title: catalog.i18nc("@title","Information")
|
||||
title: catalog.i18nc("@title", "Information")
|
||||
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
|
||||
|
|
|
@ -182,6 +182,7 @@ UM.ManagementPage
|
|||
{
|
||||
Cura.MachineManager.setActiveMaterial(material_id)
|
||||
}
|
||||
// TODO: this doesn't work because the source is a bit delayed
|
||||
base.objectList.currentIndex = base.getIndexById(material_id);
|
||||
}
|
||||
},
|
||||
|
@ -292,10 +293,16 @@ UM.ManagementPage
|
|||
base_file = base.currentItem.id
|
||||
}
|
||||
var guid = Cura.ContainerManager.getContainerMetaDataEntry(base.currentItem.id, "GUID")
|
||||
// remove base container first, it otherwise triggers loading the base file while removing other containers
|
||||
var base_containers = Cura.ContainerManager.findInstanceContainers({"GUID": guid, "id": base_file, "base_file": base_file, "type": "material"})
|
||||
for(var i in base_containers)
|
||||
{
|
||||
Cura.ContainerManager.removeContainer(base_containers[i]);
|
||||
}
|
||||
var containers = Cura.ContainerManager.findInstanceContainers({"GUID": guid, "base_file": base_file, "type": "material"})
|
||||
for(var i in containers)
|
||||
{
|
||||
Cura.ContainerManager.removeContainer(containers[i])
|
||||
Cura.ContainerManager.removeContainer(containers[i]);
|
||||
}
|
||||
if(base.objectList.currentIndex > 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue