Issue #1214: Fixed the bug when pedigree editor would close before saving the preview image