Revision 3102 trunk/extensions/extGeoreferencing/src/com/iver/cit/gvsig/gui/toolListeners/GeoRasterFrameListener.java
GeoRasterFrameListener.java | ||
---|---|---|
72 | 72 |
|
73 | 73 |
//Anulamos todos los cambios cargando el extent de origen a la capa |
74 | 74 |
//Cambiamos el nombre a la capa de georreferenciaci?n y eliminamos la capa de puntos. |
75 |
View theView = (View) PluginServices.getMDIManager().getActiveView(); |
|
75 |
View theView = null; |
|
76 |
try{ |
|
77 |
theView = (View) PluginServices.getMDIManager().getActiveView(); |
|
78 |
}catch(ClassCastException exc){ |
|
79 |
return; |
|
80 |
} |
|
76 | 81 |
|
77 | 82 |
for(int i=0;i<theView.getMapControl().getMapContext().getLayers().getLayersCount();i++){ |
78 | 83 |
FLayer lyr = theView.getMapControl().getMapContext().getLayers().getLayer(i); |
... | ... | |
91 | 96 |
((FLyrGeoRaster)lyr).getGeoDialog().getSelectPointsPanel().clearList(); |
92 | 97 |
|
93 | 98 |
} |
94 |
System.out.println("ELIMINAR!!"); |
|
95 |
if( lyr instanceof FLyrPoints){ |
|
96 |
System.out.println("ELIMINANDO "+lyr.getName()); |
|
99 |
|
|
100 |
if( lyr instanceof FLyrPoints) |
|
97 | 101 |
theView.getMapControl().getMapContext().getLayers().removeLayer(i); |
98 |
} |
|
102 |
|
|
103 |
|
|
99 | 104 |
} |
100 | 105 |
|
101 | 106 |
PluginServices.getMainFrame().enableControls(); |
Also available in: Unified diff