Ensure that changing material type results in profile re-evaluation

CURA-7657
This commit is contained in:
Jaime van Kessel 2020-08-18 13:54:21 +02:00
parent ea7dc0ff01
commit 907caa53f0
No known key found for this signature in database
GPG Key ID: 3710727397403C91
2 changed files with 3 additions and 1 deletions

View File

@ -122,6 +122,8 @@ class ContainerManager(QObject):
root_material.setMetaDataEntry(entry_name, entry_value)
if sub_item_changed: #If it was only a sub-item that has changed then the setMetaDataEntry won't correctly notice that something changed, and we must manually signal that the metadata changed.
root_material.metaDataChanged.emit(root_material)
cura.CuraApplication.CuraApplication.getInstance().getMachineManager().updateUponMaterialMetadataChange()
return True
@pyqtSlot(str, result = str)

View File

@ -1703,7 +1703,7 @@ class MachineManager(QObject):
return False
return global_stack.qualityChanges != empty_quality_changes_container
def _updateUponMaterialMetadataChange(self) -> None:
def updateUponMaterialMetadataChange(self) -> None:
if self._global_container_stack is None:
return
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):