Revision: 5802 http://sourceforge.net/p/jump-pilot/code/5802 Author: michaudm Date: 2018-05-16 07:16:37 +0000 (Wed, 16 May 2018) Log Message: ----------- Revert r5800 which breaks selection rendering subsystem
Modified Paths: -------------- core/trunk/src/com/vividsolutions/jump/workbench/ui/renderer/ImageCachingFeatureCollectionRenderer.java Modified: core/trunk/src/com/vividsolutions/jump/workbench/ui/renderer/ImageCachingFeatureCollectionRenderer.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/workbench/ui/renderer/ImageCachingFeatureCollectionRenderer.java 2018-05-13 22:12:36 UTC (rev 5801) +++ core/trunk/src/com/vividsolutions/jump/workbench/ui/renderer/ImageCachingFeatureCollectionRenderer.java 2018-05-16 07:16:37 UTC (rev 5802) @@ -7,6 +7,7 @@ import java.util.Iterator; import java.util.Map; +import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jump.feature.Feature; import com.vividsolutions.jump.workbench.model.Layer; import com.vividsolutions.jump.workbench.ui.LayerViewPanel; @@ -51,13 +52,18 @@ // frequency of ConcurrentModificationException errors. [Jon Aquino // 2005-03-02] for (Iterator i = features.iterator(); i.hasNext();) { - // Clone the feature to optimize rendering process in the case where - // feature attributes are not in memory (but read from disk or database) - final Feature feature = ((Feature) i.next()).clone(); + // 2018-05-14 : Clone the feature to optimize rendering process in the case + // where feature attributes are not in memory (but read from disk or database) + // 2018-05-16 : revert the change : selection rendering uses a map with features + // as keys and using feature clone breaks selection painting (feature does not + // implements equals) + //final Feature feature = ((Feature) i.next()).clone(); + final Feature feature = (Feature)i.next(); + Geometry geom = feature.getGeometry(); if (cancelled) { break; } - if (feature.getGeometry() == null || feature.getGeometry().isEmpty()) { + if (geom == null || geom.isEmpty()) { continue; } //Because image.draw is synchronized, it might be faster to do ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel