Revision 4193 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/EditableAdapter.java

View differences:

EditableAdapter.java
196 196
     * @throws IOException DOCUMENT ME!
197 197
     */
198 198
    public void addRow(IRow row,String descrip) throws DriverIOException, IOException {
199
        int virtualIndex = doAddRow(row);
200
        Command command=new AddRowCommand(this, row, virtualIndex);
199
        int calculatedIndex = doAddRow(row);
200
        Command command=new AddRowCommand(this, row, calculatedIndex);
201 201
        command.setDescription(descrip);
202 202
        if (complex) {
203 203
            commands.add(command);
......
426 426
     *
427 427
     * @param feat geometr?a a guardar.
428 428
     *
429
     * @return DOCUMENT ME!
429
     * @return calculatedIndex
430 430
     *
431 431
     * @throws DriverIOException
432 432
     * @throws IOException
......
436 436
        // int virtualIndex = 0;
437 437
        int calculatedIndex = -1;
438 438

  
439
        // try {
440
            // virtualIndex = (int) ods.getRowCount() + numAdd;
441
        	int externalIndex = getRowCount();
442
        	calculatedIndex = getCalculatedIndex(externalIndex);
443
        /* } catch (DriverException e) {
439
        try {
440
            calculatedIndex = (int) ods.getRowCount() + numAdd;
441
        	// int externalIndex = getRowCount();
442
        	// calculatedIndex = getCalculatedIndex(externalIndex);
443
        } catch (DriverException e) {
444 444
        	throw new DriverIOException(e);
445
        } */
445
        } 
446 446

  
447 447
        int pos = expansionFile.addRow(feat);
448 448
        relations.put(new Integer(calculatedIndex), new Integer(pos));

Also available in: Unified diff