Browse Source

Clarified comment for duplicating materials

Nino van Hooff 5 years ago
parent
commit
845cab5573
1 changed files with 2 additions and 1 deletions
  1. 2 1
      cura/Machines/Models/MaterialManagementModel.py

+ 2 - 1
cura/Machines/Models/MaterialManagementModel.py

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