[fix #11872] do not call activateLayerRelatedAction after selection change if layer is not current layer