Revision 30176 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java

View differences:

FLyrVect.java
161 161
    private int typeShape = -1;
162 162
    private ReadableVectorial source;
163 163
    private SelectableDataSource sds;
164
    private SelectionSupport selectionSupport = new SelectionSupport();
165 164
    private SpatialCache spatialCache = new SpatialCache();
166 165
    private boolean spatialCacheEnabled = false;
167 166

  
......
404 403
    			if (getSource().getDriverAttributes() != null){
405 404
    				isInMemory = getSource().getDriverAttributes().isLoadedInMemory();
406 405
    			}
407
    			
406
    			SelectionSupport selectionSupport=getSelectionSupport();
408 407
    			// Iteration over each feature
409 408
    			while ( !cancel.isCanceled() && it.hasNext()) {
410 409
    				IFeature feat = it.next();
......
415 414
    				}else{
416 415
    					geom = feat.getGeometry();
417 416
    				}
418
    				
417

  
419 418
    				if (cacheFeatures) {
420 419
    					if (cache.getMaxFeatures() >= cache.size()) {
421 420
    						// already reprojected
......
1541 1540
                }
1542 1541

  
1543 1542
                sds = ds;
1544
                sds.setSelectionSupport(selectionSupport);
1545
                selectionSupport.addSelectionListener(this);
1543
                getSelectionSupport().addSelectionListener(this);
1546 1544

  
1547 1545
        }
1548 1546
        return sds;
......
1635 1633
    public void setRecordset(SelectableDataSource newSds) {
1636 1634
    	// TODO: Deberiamos hacer comprobaciones del cambio
1637 1635
        sds = newSds;
1638
        sds.setSelectionSupport(selectionSupport);
1639
		selectionSupport.addSelectionListener(this);
1636
		getSelectionSupport().addSelectionListener(this);
1640 1637
		this.updateDrawVersion();
1641 1638
    }
1642 1639

  
......
1775 1772
    }
1776 1773

  
1777 1774
    public SelectionSupport getSelectionSupport() {
1778
		return this.selectionSupport;
1775
		try {
1776
			return getRecordset().getSelectionSupport();
1777
		} catch (ReadDriverException e) {
1778
			e.printStackTrace();
1779
		}
1780
		return null;
1779 1781
	}
1780 1782

  
1781 1783
    protected boolean isOnePoint(AffineTransform graphicsTransform, ViewPort viewPort, double dpi, CartographicSupport csSym, IGeometry geom, int[] xyCoords) {

Also available in: Unified diff