Revision 12132 branches/v10/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/AnnotationEditableAdapter.java
AnnotationEditableAdapter.java | ||
---|---|---|
168 | 168 |
|
169 | 169 |
|
170 | 170 |
public int doAddRow(IRow feat, int sourceType) throws DriverIOException, IOException { |
171 |
boolean cancel = fireBeforeRowAdded(sourceType); |
|
171 |
boolean cancel = fireBeforeRowAdded(sourceType,feat.getID());
|
|
172 | 172 |
if (cancel) |
173 | 173 |
return -1; |
174 | 174 |
Value[] values=feat.getAttributes(); |
... | ... | |
187 | 187 |
|
188 | 188 |
int calculatedIndex = -1; |
189 | 189 |
try { |
190 |
calculatedIndex = (int) getNewIndex() ;
|
|
190 |
calculatedIndex = (int) getOriginalRecordset().getRowCount() + numAdd;
|
|
191 | 191 |
} catch (com.hardcode.gdbms.engine.data.driver.DriverException e) { |
192 | 192 |
throw new DriverIOException(e); |
193 | 193 |
} |
... | ... | |
406 | 406 |
} |
407 | 407 |
|
408 | 408 |
public void undoRemoveRow(int index, int sourceType) throws IOException, DriverIOException { |
409 |
boolean cancel = fireBeforeRowAdded(sourceType); |
|
410 |
if (cancel) |
|
409 |
|
|
410 |
delRows.set(index, false); |
|
411 |
String fid=getRow(index).getID(); |
|
412 |
boolean cancel = fireBeforeRowAdded(sourceType,fid); |
|
413 |
if (cancel){ |
|
414 |
delRows.set(index,true); |
|
411 | 415 |
return; |
412 |
delRows.set(index, false);
|
|
416 |
}
|
|
413 | 417 |
Rectangle2D r = getLabel(index,true).getBoundBox(); |
414 | 418 |
this.index.insert(new Envelope(r.getX(), r.getX() + r.getWidth(), |
415 | 419 |
r.getY(), r.getY() + r.getHeight()), new Integer(index)); |
Also available in: Unified diff