Revision 12040 branches/v10/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/EditableAdapter.java

View differences:

EditableAdapter.java
487 487
		}
488 488

  
489 489
	}
490

  
490
	public int getNewIndex() throws com.hardcode.gdbms.engine.data.driver.DriverException {
491
		int index=(int)ods.getRowCount() + numAdd;
492
		return index;
493
	}
491 494
	/*
492 495
	 * (non-Javadoc)
493 496
	 *
......
1280 1283
	protected boolean fireBeforeRowAdded(int sourceType)
1281 1284
			throws DriverIOException, IOException {
1282 1285
		Cancel cancel = new Cancel();
1283
		BeforeRowEditEvent event = new BeforeRowEditEvent(this, getRowCount(),
1284
				EditionEvent.CHANGE_TYPE_ADD, cancel, sourceType);
1286
		BeforeRowEditEvent event;
1287
		try {
1288
			event = new BeforeRowEditEvent(this, getNewIndex(),
1289
					EditionEvent.CHANGE_TYPE_ADD, cancel, sourceType);
1290
		} catch (DriverException e) {
1291
			throw new DriverIOException(e);
1292
		}
1285 1293
		for (int i = 0; i < editionListeners.size(); i++) {
1286 1294
			IEditionListener listener = (IEditionListener) editionListeners
1287 1295
					.get(i);

Also available in: Unified diff