Preselect active layer when available or unselect layer and relative attribs when no layer is active