Clarified comment for duplicating materials

This commit is contained in:
Nino van Hooff 2019-10-15 14:37:37 +02:00
parent 36aab5d56b
commit 845cab5573

View file

@ -141,7 +141,8 @@ class MaterialManagementModel(QObject):
new_container.getMetaData().update(new_metadata)
new_containers.append(new_container)
# Optimization. Serving the same purpose as the postponeSignals() in removeMaterial()
# postpone the signals emitted when duplicating materials. This is easier on the event loop; changes the
# behavior to be like a transaction. Prevents concurrency issues.
with postponeSignals(container_registry.containerAdded, compress=CompressTechnique.CompressPerParameterValue):
for container_to_add in new_containers:
container_to_add.setDirty(True)