Revision 1729 branches/FMap_piloto_CAD_Layout_version/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/DefaultEditableFeatureSource.java
DefaultEditableFeatureSource.java | ||
---|---|---|
58 | 58 |
* @throws EditionException |
59 | 59 |
*/ |
60 | 60 |
public void startEdition() throws EditionException { |
61 |
ofa.startEdition(); |
|
62 |
|
|
61 |
if (ofa!=null){ |
|
62 |
ofa.startEdition(); |
|
63 |
} |
|
63 | 64 |
try { |
64 | 65 |
expansionFile.open(); |
65 | 66 |
index = new Quadtree(); |
... | ... | |
121 | 122 |
* @throws DriverIOException |
122 | 123 |
*/ |
123 | 124 |
public int getGeometryCount() throws DriverIOException { |
125 |
if (ofa!=null) |
|
124 | 126 |
return ofa.getGeometryCount() + numAdd; //expansionFile.getGeometryCount() - relations.size(); |
127 |
return numAdd; |
|
125 | 128 |
} |
126 | 129 |
|
127 | 130 |
/** |
... | ... | |
385 | 388 |
* @throws IOException |
386 | 389 |
*/ |
387 | 390 |
public int doAddGeometry(IGeometry g) throws DriverIOException, IOException { |
388 |
int virtualIndex = ofa.getGeometryCount() + numAdd; |
|
391 |
int virtualIndex=0; |
|
392 |
if (ofa!=null){ |
|
393 |
virtualIndex = ofa.getGeometryCount() + numAdd; |
|
394 |
}else{ |
|
395 |
virtualIndex = numAdd; |
|
396 |
} |
|
389 | 397 |
int pos = expansionFile.addGeometry(g); |
390 | 398 |
relations.put(new Integer(virtualIndex), new Integer(pos)); |
391 | 399 |
numAdd++; |
Also available in: Unified diff