SWC-364: only refresh the attachments of the entity when the edit dialog is visible