Revision 28367 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/VectorialEditableAdapter.java

View differences:

VectorialEditableAdapter.java
623 623
		} else {
624 624
			// Obtenemos el ?ndice en el fichero de expansi?n
625 625
			int num = ((Integer) relations.get(integer)).intValue();
626
			posAnteriorInExpansionFile = num;
626
			posAnteriorInExpansionFile=num;
627 627

  
628 628
			// Obtenemos la geometr?a para actualiza el ?ndice
629 629
			// espacialposteriormente
......
648 648
				this.fmapSpatialIndex.delete(rAnt, new Integer(calculatedIndex));
649 649
				this.fmapSpatialIndex.insert(r, new Integer(calculatedIndex));
650 650
			}
651

  
651 652
		}
652 653
		isFullExtentDirty = true;
653 654
		fireAfterModifyRow(calculatedIndex, sourceType);
......
671 672
	 * @throws IOException
672 673
	 * @throws DriverIOException
673 674
	 */
674
	public void undoModifyRow(int calculatedIndex,
675
	public int undoModifyRow(int calculatedIndex,
675 676
			int previousExpansionFileIndex, int sourceType) throws EditionCommandException{
676 677
		try {
677 678
			// Llega el CalculatedIndex
......
691 692
				boolean cancel = fireBeforeModifyRow(df, calculatedIndex,
692 693
						sourceType);
693 694
				if (cancel)
694
					return;
695
					return -1;
695 696
				IGeometry g = df.getGeometry();
696 697
				// IGeometry g = ova.getShape(calculatedIndex);
697 698
				Rectangle2D r = g.getBounds2D();
......
718 719
				boolean cancel = fireBeforeModifyRow(df, calculatedIndex,
719 720
						sourceType);
720 721
				if (cancel)
721
					return;
722
					return -1;
722 723
				if (sourceType == EditionEvent.GRAPHIC) {
723 724
					g = df.getGeometry();
724 725
					System.out.println("Actual: " + g.toString());
......
741 742
				}
742 743
				// Se actualiza la relaci?n de ?ndices
743 744
				// Integer integer = new Integer(geometryIndex);
745
				int numAnt=((Integer)relations.get(new Integer(calculatedIndex))).intValue();
744 746
				relations.put(new Integer(calculatedIndex), new Integer(
745 747
						previousExpansionFileIndex));
748
				return numAnt;
746 749

  
747 750
			}
748 751
		} catch (ReadDriverException e) {
749 752
			throw new EditionCommandException(writer.getName(),e);
750 753
		}
751 754
		//fireAfterModifyRow(calculatedIndex, sourceType);
755
		return -1;
752 756
	}
753 757

  
754 758
	/**

Also available in: Unified diff