Using CompoundEdit when adding objects.