Close view if open on delete command