private void setCurrentFeature(final Feature feature) {
   this.feature = feature;
   if (feature != null) {
     final Geometry geom = (Geometry) FeatureExt.getDefaultGeometryAttributeValue(feature);
     decoration.setGeometries(Collections.singleton(helper.toObjectiveCRS(geom)));
     dialogDecoration.clipboardPanel.setGeometry(geom);
     dialogDecoration.clipboardPanel.setCrs(FeatureExt.getCRS(feature.getType()));
   } else {
     dialogDecoration.clipboardPanel.setGeometry(null);
   }
 }
  @Override
  public void mouseClicked(final MouseEvent e) {

    final int button = e.getButton();

    if (button == MouseEvent.BUTTON1) {
      if (feature == null) {
        setCurrentFeature(helper.grabFeature(e.getX(), e.getY(), false));
      }
    } else if (button == MouseEvent.BUTTON3 && feature != null) {
      final Geometry oldgeom = (Geometry) FeatureExt.getDefaultGeometryAttributeValue(feature);
      final Geometry newGeom = dialogDecoration.clipboardPanel.getGeometry();
      if (!oldgeom.equals(newGeom)) {
        helper.sourceModifyFeature(feature, newGeom, false);
      }
      reset();
    }
  }