Revision 28367 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/AnnotationEditableAdapter.java
AnnotationEditableAdapter.java | ||
---|---|---|
333 | 333 |
fireAfterRemoveRow(calculatedIndex, sourceType); |
334 | 334 |
} |
335 | 335 |
|
336 |
public void undoModifyRow(int calculatedIndex, int previousExpansionFileIndex, int sourceType) throws EditionCommandException {
|
|
336 |
public int undoModifyRow(int calculatedIndex, int previousExpansionFileIndex, int sourceType) throws EditionCommandException {
|
|
337 | 337 |
try { |
338 | 338 |
if (previousExpansionFileIndex == -1) { |
339 | 339 |
//Se obtiene la geometr?a para actualizar el ?ndice |
... | ... | |
352 | 352 |
IGeometry gAnt = dfAnt.getGeometry(); |
353 | 353 |
boolean cancel = fireBeforeModifyRow(dfAnt,calculatedIndex, sourceType); |
354 | 354 |
if (cancel) |
355 |
return; |
|
355 |
return -1;
|
|
356 | 356 |
Rectangle2D rAnt = gAnt.getBounds2D(); |
357 | 357 |
this.fmapSpatialIndex.delete(r, new Integer(calculatedIndex)); |
358 | 358 |
this.fmapSpatialIndex.insert(rAnt, new Integer(calculatedIndex)); |
... | ... | |
366 | 366 |
g = df.getGeometry(); |
367 | 367 |
Rectangle2D r = g.getBounds2D(); |
368 | 368 |
this.fmapSpatialIndex.delete(r, new Integer(calculatedIndex)); |
369 |
|
|
369 |
int numAnt=((Integer)relations.get(new Integer(calculatedIndex))).intValue(); |
|
370 | 370 |
//Se actualiza la relaci?n de ?ndices |
371 | 371 |
relations.put(new Integer(calculatedIndex), |
372 | 372 |
new Integer(previousExpansionFileIndex)); |
... | ... | |
375 | 375 |
df=(DefaultFeature)getRow(inverse).getLinkedRow(); |
376 | 376 |
boolean cancel = fireBeforeModifyRow(df,calculatedIndex, sourceType); |
377 | 377 |
if (cancel) |
378 |
return; |
|
378 |
return -1;
|
|
379 | 379 |
g = df.getGeometry(); |
380 | 380 |
r = g.getBounds2D(); |
381 | 381 |
this.fmapSpatialIndex.insert(r, new Integer(calculatedIndex)); |
... | ... | |
385 | 385 |
if (mapping.getColumnRotate()==mapping.getColumnText()){ |
386 | 386 |
label.setRotation(((NumericValue)value).doubleValue()); |
387 | 387 |
} |
388 |
return numAnt; |
|
388 | 389 |
} |
389 | 390 |
} catch (ReadDriverException e) { |
390 | 391 |
throw new EditionCommandException(writer.getName(),e); |
391 | 392 |
} |
392 | 393 |
fireAfterModifyRow(calculatedIndex, sourceType); |
394 |
return -1; |
|
393 | 395 |
} |
394 | 396 |
|
395 | 397 |
public void undoRemoveRow(int index, int sourceType) throws EditionCommandException { |
Also available in: Unified diff