Revision 9133 branches/v10/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/tools/EditVertexCADTool.java
EditVertexCADTool.java | ||
---|---|---|
251 | 251 |
} catch (DriverIOException e) { |
252 | 252 |
e.printStackTrace(); |
253 | 253 |
} |
254 |
clearSelection(); |
|
255 |
selectedRows.add(new DefaultRowEdited(newRow, |
|
256 |
IRowEdited.STATUS_MODIFIED, row.getIndex())); |
|
257 |
// vle.refreshSelectionCache(new Point2D.Double(0,0),getCadToolAdapter()); |
|
258 |
// refresh(); |
|
254 | 259 |
|
255 |
vle.refreshSelectionCache(new Point2D.Double(0,0),getCadToolAdapter()); |
|
256 |
refresh(); |
|
257 |
|
|
258 | 260 |
} |
259 | 261 |
}else if(s.equals("i") || s.equals("I") || s.equals(PluginServices.getText(this,"add"))){ |
260 | 262 |
addVertex=true; |
... | ... | |
270 | 272 |
IGeometry ig = fea.getGeometry().cloneGeometry(); |
271 | 273 |
if (ig == null) continue; |
272 | 274 |
Handler[] handlers=ig.getHandlers(IGeometry.SELECTHANDLER); |
273 |
if (numSelect>handlers.length) |
|
275 |
if (numSelect>=handlers.length)
|
|
274 | 276 |
numSelect=0; |
275 | 277 |
FGraphicUtilities.DrawVertex((Graphics2D)g,at,handlers[numSelect]); |
276 | 278 |
} |
... | ... | |
364 | 366 |
shp = new FPolygon2D(newGp); |
365 | 367 |
break; |
366 | 368 |
} |
367 |
return ShapeFactory.createGeometry(shp); |
|
369 |
IGeometry ig=ShapeFactory.createGeometry(shp); |
|
370 |
int dif=1;//En el caso de ser pol?gono. |
|
371 |
numSelect=numSelect-dif; |
|
372 |
if (numSelect<0){ |
|
373 |
numSelect=numHandlers-1+(numSelect+1); |
|
374 |
} |
|
375 |
return ig; |
|
368 | 376 |
} |
369 | 377 |
|
370 | 378 |
private IGeometry removeVertexGC(FGeometryCollection gc,Handler handler) { |
Also available in: Unified diff