Update of visibilityLayer when on the same Criteria

When on same Criteria categoryLayersPre was not updated, so when clicking on Criteria link  makers where not correctly shown.
Revise to refactor.