Revision 1450 branches/pilotoDWG/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/DefaultEditableFeatureSource.java
DefaultEditableFeatureSource.java | ||
---|---|---|
20 | 20 |
private OriginalFeatureAdapter ofa; |
21 | 21 |
private BitSet delgeometries = new BitSet(); |
22 | 22 |
private HashMap relations = new HashMap(); |
23 |
private int numAdd=0; |
|
23 | 24 |
|
24 | 25 |
/** |
25 | 26 |
* Crea un nuevo AbstractEditableFeatureSource. |
... | ... | |
60 | 61 |
* @throws DriverIOException |
61 | 62 |
*/ |
62 | 63 |
public int getGeometryCount() throws DriverIOException { |
63 |
return ofa.getGeometryCount() + expansionFile.getGeometryCount();
|
|
64 |
return ofa.getGeometryCount() + numAdd;//expansionFile.getGeometryCount() - relations.size();
|
|
64 | 65 |
} |
65 | 66 |
|
66 | 67 |
/** |
... | ... | |
103 | 104 |
* @throws IOException |
104 | 105 |
*/ |
105 | 106 |
public void addGeometry(IGeometry g) throws DriverIOException, IOException { |
106 |
int virtualIndex = ofa.getGeometryCount() + expansionFile.getGeometryCount();
|
|
107 |
int virtualIndex = ofa.getGeometryCount() + numAdd;
|
|
107 | 108 |
int pos = expansionFile.addGeometry(g); |
108 | 109 |
relations.put(new Integer(virtualIndex), new Integer(pos)); |
110 |
numAdd++; |
|
109 | 111 |
} |
110 | 112 |
|
111 | 113 |
/** |
Also available in: Unified diff