Revision 12148 trunk/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/DefaultCADTool.java
DefaultCADTool.java | ||
---|---|---|
55 | 55 |
import com.hardcode.gdbms.engine.values.Value; |
56 | 56 |
import com.hardcode.gdbms.engine.values.ValueFactory; |
57 | 57 |
import com.iver.andami.PluginServices; |
58 |
import com.iver.andami.messages.NotificationManager; |
|
58 | 59 |
import com.iver.cit.gvsig.CADExtension; |
59 | 60 |
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileReadException; |
60 | 61 |
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileWriteException; |
... | ... | |
184 | 185 |
for (int i = 0; i < numAttr; i++) { |
185 | 186 |
values[i] = ValueFactory.createNullValue(); |
186 | 187 |
} |
187 |
int num; |
|
188 |
num = vea.getRowCount(); |
|
189 |
DefaultFeature df = new DefaultFeature(geometry, values, String |
|
190 |
.valueOf(num)); |
|
188 |
String newFID = vea.getNewFID(); |
|
189 |
DefaultFeature df = new DefaultFeature(geometry, values, newFID); |
|
191 | 190 |
int index = vea.addRow(df, getName(), EditionEvent.GRAPHIC); |
192 | 191 |
VectorialLayerEdited vle = getVLE(); |
193 | 192 |
clearSelection(); |
... | ... | |
261 | 260 |
int index = 0; |
262 | 261 |
VectorialEditableAdapter vea = getVLE().getVEA(); |
263 | 262 |
try { |
264 |
int num = vea.getRowCount(); |
|
265 |
DefaultFeature df = new DefaultFeature(geometry, values, String |
|
266 |
.valueOf(num)); |
|
263 |
String newFID = vea.getNewFID(); |
|
264 |
DefaultFeature df = new DefaultFeature(geometry, values, newFID); |
|
267 | 265 |
index = vea.addRow(df, getName(), EditionEvent.GRAPHIC); |
268 | 266 |
} catch (ValidateRowException e) { |
269 |
// TODO Auto-generated catch block |
|
270 |
e.printStackTrace(); |
|
267 |
NotificationManager.addError(e); |
|
271 | 268 |
} catch (ReadDriverException e) { |
272 |
// TODO Auto-generated catch block |
|
273 |
e.printStackTrace(); |
|
269 |
NotificationManager.addError(e); |
|
274 | 270 |
} catch (ExpansionFileWriteException e) { |
275 |
// TODO Auto-generated catch block |
|
276 |
e.printStackTrace(); |
|
271 |
NotificationManager.addError(e); |
|
277 | 272 |
} |
278 | 273 |
return vea.getInversedIndex(index); |
279 | 274 |
} |
... | ... | |
381 | 376 |
VectorialEditableAdapter vea = vle.getVEA(); |
382 | 377 |
FBitSet selection = vea.getSelection(); |
383 | 378 |
selection.clear(); |
384 |
// vea.setSelectionImage(null);
|
|
385 |
// vea.setHandlersImage(null);
|
|
379 |
vea.setSelectionImage(null); |
|
380 |
vea.setHandlersImage(null); |
|
386 | 381 |
|
387 | 382 |
} |
388 | 383 |
|
Also available in: Unified diff