mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-01 08:14:22 +08:00
Force update after unlinking material.
This commit is contained in:
parent
67b8302d40
commit
a1d9b1a37f
@ -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 }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user