Revision 3003 trunk/extensions/extGeoreferencing/src/com/iver/cit/gvsig/gui/Dialogs/GeoreferencingDialog.java
GeoreferencingDialog.java | ||
---|---|---|
292 | 292 |
bAceptar.addActionListener(new java.awt.event.ActionListener() { |
293 | 293 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
294 | 294 |
View theView = (View) PluginServices.getMDIManager().getActiveView(); |
295 |
|
|
296 |
//Obtenemos la capa de georaster y le cambiamos el nombre |
|
297 | 295 |
FLyrGeoRaster lyrGeoRaster = null; |
298 | 296 |
FLyrPoints lyrPoints = null; |
297 |
|
|
299 | 298 |
for(int i=0;i<theView.getMapControl().getMapContext().getLayers().getLayersCount();i++){ |
300 | 299 |
FLayer lyr = theView.getMapControl().getMapContext().getLayers().getLayer(i); |
301 | 300 |
if( lyr instanceof FLyrGeoRaster && |
302 |
lyr.getName().startsWith("*")){ |
|
301 |
lyr.getName().startsWith("*") && |
|
302 |
lyr.isActive()){ |
|
303 |
//A la capa Georraster le asignamos la capa de puntos para poder recuperarla |
|
304 |
|
|
305 |
lyr.setName(lyr.getName().substring(1, lyr.getName().length())); |
|
306 |
lyr.setActive(false); |
|
303 | 307 |
lyrGeoRaster = (FLyrGeoRaster)lyr; |
304 |
lyrGeoRaster.setName(lyrGeoRaster.getName().substring(1, lyrGeoRaster.getName().length())); |
|
305 | 308 |
} |
306 |
if( lyr instanceof FLyrPoints){ |
|
309 |
|
|
310 |
if( lyr instanceof FLyrPoints) |
|
307 | 311 |
lyrPoints = (FLyrPoints)lyr; |
308 |
theView.getMapControl().getMapContext().getLayers().removeLayer(i); |
|
309 |
} |
|
310 | 312 |
} |
311 | 313 |
|
312 |
//A la capa Georraster le asignamos la capa de puntos para poder recuperarla
|
|
313 |
lyrGeoRaster.setFLyrPoints(lyrPoints); |
|
314 |
if(lyrGeoRaster != null)
|
|
315 |
lyrGeoRaster.setFLyrPoints(lyrPoints);
|
|
314 | 316 |
|
317 |
System.out.println("**Guardando ... "+lyr.getName()); |
|
318 |
if(lyrPoints != null) |
|
319 |
lyrPoints.showPoints(); |
|
320 |
System.out.println("null"); |
|
321 |
|
|
315 | 322 |
theView.getMapControl().setTool("zoomIn"); |
316 | 323 |
|
317 | 324 |
//Cerramos la ventana |
325 |
//(se ejecuta el evento internalFrameClosing de GeoRasterFrameListener) |
|
318 | 326 |
try{ |
319 | 327 |
frame.setClosed(true); |
320 | 328 |
}catch(PropertyVetoException exc){} |
Also available in: Unified diff