[Schmitzm-commits] r659 - in branches/2.0-RC2/src: schmitzm/geotools/feature schmitzm/geotools/gui skrueger/geotools

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Feb 3 16:35:23 CET 2010


Author: mojays
Date: 2010-02-03 16:35:20 +0100 (Wed, 03 Feb 2010)
New Revision: 659

Modified:
   branches/2.0-RC2/src/schmitzm/geotools/feature/FeatureUtil.java
   branches/2.0-RC2/src/schmitzm/geotools/gui/JMapEditorPane.java
   branches/2.0-RC2/src/skrueger/geotools/XMapPaneMouseListener.java
Log:
Fix in FeatureUtil.createSampleFeature(.): create default geometry
Fix in XMapPaneMouseListener.performMouseReleased(.): do not handle mouseClicked

Modified: branches/2.0-RC2/src/schmitzm/geotools/feature/FeatureUtil.java
===================================================================
--- branches/2.0-RC2/src/schmitzm/geotools/feature/FeatureUtil.java	2010-02-03 15:32:21 UTC (rev 658)
+++ branches/2.0-RC2/src/schmitzm/geotools/feature/FeatureUtil.java	2010-02-03 15:35:20 UTC (rev 659)
@@ -286,7 +286,7 @@
 	 *            a map layer
 	 */
 	public static GeometryForm getGeometryForm(MapLayer layer) {
-		return getGeometryForm((SimpleFeatureType) layer.getFeatureSource());
+		return getGeometryForm((SimpleFeatureType) layer.getFeatureSource().getSchema());
 	}
 
 	/**
@@ -1801,7 +1801,10 @@
 			Object... values) {
 		SimpleFeature sampleFeature;
 
-		// Object[] attributes = getDefaultAttributeValues(schema);
+		//MS: Sind keine Attribut-Werte angegeben, Standard-Werte (insb.
+		//    fuer die etwaige Geometrie generieren)
+		if ( values.length == 0 )
+		  values = getDefaultAttributeValues(schema);
 
 		try {
 			SimpleFeatureBuilder builder = new SimpleFeatureBuilder(schema);

Modified: branches/2.0-RC2/src/schmitzm/geotools/gui/JMapEditorPane.java
===================================================================
--- branches/2.0-RC2/src/schmitzm/geotools/gui/JMapEditorPane.java	2010-02-03 15:32:21 UTC (rev 658)
+++ branches/2.0-RC2/src/schmitzm/geotools/gui/JMapEditorPane.java	2010-02-03 15:35:20 UTC (rev 659)
@@ -956,12 +956,14 @@
 
   /**
    * Checks, whether the editor layer is empty. If it is, a dummy feature is inserted
-   * because the StreamingRenderer can not handle empty SimpleFeature-Layers yet
+   * because the StreamingRenderer can not handle empty Feature-Layers yet
    * (also if the layer is hidden!).
    * At the moment, the first a feature is added, the dummy feature is removed, so
    * is is not displayed any time.
    */
   private void resetEditorLayerVisibility() {
+//    if ( 1==1 )
+//      return;
     // if layer is empty, insert a Dummy-SimpleFeature (and hide the
     // layer) because the StreamingRenderer can not handle empty
     // SimpleFeature-Layers yet

Modified: branches/2.0-RC2/src/skrueger/geotools/XMapPaneMouseListener.java
===================================================================
--- branches/2.0-RC2/src/skrueger/geotools/XMapPaneMouseListener.java	2010-02-03 15:32:21 UTC (rev 658)
+++ branches/2.0-RC2/src/skrueger/geotools/XMapPaneMouseListener.java	2010-02-03 15:35:20 UTC (rev 659)
@@ -142,13 +142,7 @@
 	}
 
 	public void performMouseReleased(MouseEvent mEv) {
-
-		if (mEv.getPoint().equals(dragStartPos)) {
-			performMouseClicked(mEv);
-			return;
-		}
-
-		MouseInputType key;
+	  MouseInputType key;
 		switch (mEv.getButton()) {
 		case MouseEvent.BUTTON1:
 			key = MouseInputType.LDrag;



More information about the Schmitzm-commits mailing list