Revision 3102 trunk/extensions/extGeoreferencing/src/com/iver/cit/gvsig/gui/Panels/DataPointsTabPanel.java
DataPointsTabPanel.java | ||
---|---|---|
128 | 128 |
Point2D map = new Point2D.Double(); |
129 | 129 |
map.setLocation(lon, lat); |
130 | 130 |
|
131 |
FLyrGeoRaster lyrGeoRaster = null; |
|
132 |
View theView = (View) PluginServices.getMDIManager().getActiveView(); |
|
131 |
FLyrGeoRaster lyrGeoRaster = null; |
|
132 |
View theView = null; |
|
133 |
try{ |
|
134 |
theView = (View)PluginServices.getMDIManager().getActiveView(); |
|
135 |
}catch(ClassCastException exce){ |
|
136 |
return; |
|
137 |
} |
|
133 | 138 |
for(int i=0;i<theView.getMapControl().getMapContext().getLayers().getLayersCount();i++){ |
134 | 139 |
FLayer lyr = theView.getMapControl().getMapContext().getLayers().getLayer(i); |
135 | 140 |
if( lyr instanceof FLyrGeoRaster && |
... | ... | |
148 | 153 |
}catch(ArrayIndexOutOfBoundsException ex){ |
149 | 154 |
//Si da una excepci?n de este tipo es que no hay cargado nin?n punto |
150 | 155 |
//por lo que no hacemos nada. |
156 |
}catch(ClassCastException ex){ |
|
157 |
//Si da una excepci?n de este tipo lo m?s probable es que no haya una |
|
158 |
//vista activa y no se pueda crear una capa de puntos. Tampoco se hace nada. |
|
151 | 159 |
} |
152 | 160 |
}else{ |
153 | 161 |
JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(), |
Also available in: Unified diff