code: private void deselectLayer(Layer<?> layer) {
  		if (layer != null) {
  			layer.setSelected(false);
  			handlerManager.fireEvent(new LayerDeselectedEvent(layer));
  		}
  	}
docs: Deselect the currently selected layer, includes sending the deselect events.
  
  @param layer
  layer to clear