CURA-5562 Don't trigger the stop slicing if some nodes without build

plate associated with it changes in the scene, such as the NozzleNode in
the SimulationView.
This commit is contained in:
Diego Prado Gesto 2018-07-12 14:34:42 +02:00
parent 461b191648
commit e88362930d

View file

@ -457,7 +457,8 @@ class CuraEngineBackend(QObject, Backend):
# Only count sliceable objects
if node.callDecoration("isSliceable"):
build_plate_number = node.callDecoration("getBuildPlateNumber")
num_objects[build_plate_number] += 1
if build_plate_number is not None:
num_objects[build_plate_number] += 1
return num_objects
## Listener for when the scene has changed.
@ -490,7 +491,9 @@ class CuraEngineBackend(QObject, Backend):
if mesh_data and mesh_data.getVertices() is None:
return
build_plate_changed.add(source_build_plate_number)
# There are some SceneNodes that do not have any build plate associated, then do not add to the list.
if source_build_plate_number is not None:
build_plate_changed.add(source_build_plate_number)
if not build_plate_changed:
return