Deleting an object in a caf::PdmChildArrayField
The easisest way to delete an object in a childArrayField
is to mark the object as deletable using setDeletable(true)
. Then the Pdm framework will make sure the general delete feature is active on the object. This will make sure the Delete feature is available from the context menu of the object.
The virtual method PdmObjectHandle::onChildDeleted()
can be used when you need to trigger code after an object is deleted. This method will be called on the object having a childArrayField
as member.
If additional updates are required, caf::Signal
can be used.