Force update after unlinking material.

This commit is contained in:
fieldOfView 2017-04-29 21:19:54 +02:00
parent 67b8302d40
commit a1d9b1a37f

View File

@ -24,8 +24,13 @@ TabView
property double spoolLength: calculateSpoolLength() property double spoolLength: calculateSpoolLength()
property real costPerMeter: calculateCostPerMeter() property real costPerMeter: calculateCostPerMeter()
property bool reevaluateLinkedMaterials: false
property string linkedMaterialNames: property string linkedMaterialNames:
{ {
if (reevaluateLinkedMaterials)
{
reevaluateLinkedMaterials = false;
}
if(!base.containerId || !base.editingEnabled) if(!base.containerId || !base.editingEnabled)
{ {
return "" return ""
@ -220,7 +225,11 @@ TabView
id: unlinkMaterialButton id: unlinkMaterialButton
text: catalog.i18nc("@label", "Unlink Material") text: catalog.i18nc("@label", "Unlink Material")
visible: base.linkedMaterialNames != "" visible: base.linkedMaterialNames != ""
onClicked: Cura.ContainerManager.unlinkMaterial(base.containerId) onClicked:
{
Cura.ContainerManager.unlinkMaterial(base.containerId)
base.reevaluateLinkedMaterials = true
}
} }
Item { width: parent.width; height: UM.Theme.getSize("default_margin").height } Item { width: parent.width; height: UM.Theme.getSize("default_margin").height }