Merge branch 'feature_local_container_server'

This commit is contained in:
Ghostkeeper 2017-12-11 15:51:17 +01:00
commit 75df653d47
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A
112 changed files with 689 additions and 609 deletions

View file

@ -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()

View file

@ -41,7 +41,7 @@ TabView
Tab
{
title: catalog.i18nc("@title","Information")
title: catalog.i18nc("@title", "Information")
anchors.margins: UM.Theme.getSize("default_margin").width

View file

@ -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)
{