[Schmitzm-commits] r493 - in branches/1.0-gt2-2.6/src: gtmig/org/geotools/swing schmitzm/geotools/gui skrueger/geotools/selection
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Oct 23 16:09:29 CEST 2009
Author: mojays
Date: 2009-10-23 16:09:27 +0200 (Fri, 23 Oct 2009)
New Revision: 493
Modified:
branches/1.0-gt2-2.6/src/gtmig/org/geotools/swing/JMapPane.java
branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/FeatureTablePane.java
branches/1.0-gt2-2.6/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java
Log:
BugFix: Handle empty Rectangle in JMapPane#fixAspectRatio(..)
FeatureTablePane: check for "valueAdjusting" removed (because this must be done in event firing, not in event handling!)
Modified: branches/1.0-gt2-2.6/src/gtmig/org/geotools/swing/JMapPane.java
===================================================================
--- branches/1.0-gt2-2.6/src/gtmig/org/geotools/swing/JMapPane.java 2009-10-23 13:49:49 UTC (rev 492)
+++ branches/1.0-gt2-2.6/src/gtmig/org/geotools/swing/JMapPane.java 2009-10-23 14:09:27 UTC (rev 493)
@@ -370,8 +370,13 @@
boolean grow) {
if (mapArea == null) {
- LOGGER.warn("mapArea has been null in method fixAspectRatio, returning an unmodified ");
+ LOGGER.warn("mapArea has been null in method fixAspectRatio, returning also NULL");
+ return null;
}
+ if ( r == null || r.width == 0 || r.height == 0 ) {
+ LOGGER.warn("Empty rectangle in method fixAspectRatio, returning an unmodified mapArea!");
+ return mapArea;
+ }
final double mapWidth = mapArea.getWidth(); /* get the extent of the map */
final double mapHeight = mapArea.getHeight();
Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/FeatureTablePane.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/FeatureTablePane.java 2009-10-23 13:49:49 UTC (rev 492)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/FeatureTablePane.java 2009-10-23 14:09:27 UTC (rev 493)
@@ -274,8 +274,7 @@
featuresTable.getSelectionModel().addListSelectionListener(
new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
- if (!e.getValueIsAdjusting())
- performListSelection();
+ performListSelection();
}
});
@@ -439,7 +438,7 @@
* .evaluate(FeatureOperationTree.java:92) at
* schmitzm.lang.tree.OperationTree.evaluate(OperationTree.java:181)
*/
- //mapPane.zoomTo(getFeatureCollection()); //
+// mapPane.zoomTo(getFeatureCollection()); //
}
// Vorschaukarte aktualisieren
Modified: branches/1.0-gt2-2.6/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java
===================================================================
--- branches/1.0-gt2-2.6/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java 2009-10-23 13:49:49 UTC (rev 492)
+++ branches/1.0-gt2-2.6/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java 2009-10-23 14:09:27 UTC (rev 493)
@@ -287,15 +287,16 @@
DuplicatingStyleVisitor dsv = new DuplicatingStyleVisitor();
dsv.visit(originalStyle);
Style newStyle = (Style) dsv.getCopy();
-//
+
+//SK-Debug
// try {
////
//// StylingUtil.saveStyleToSLD(newStyle, new File(
//// "/home/stefan/Desktop/selection.sld"));
// } catch (Exception e) {
// }
-//
-// // DuplicatingStyleVisitor dsv = new DuplicatingStyleVisitor();
+
+ // DuplicatingStyleVisitor dsv = new DuplicatingStyleVisitor();
// dsv.visit(originalStyle);
// Style newStyle = originalStyle;
More information about the Schmitzm-commits
mailing list