Просмотр исходного кода

Clarified comment for duplicating materials

Nino van Hooff 5 лет назад
Родитель
Сommit
845cab5573
1 измененных файлов с 2 добавлено и 1 удалено
  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)