Revision 36

View differences:

org.gvsig.wfs.app/trunk/org.gvsig.wfs.app/org.gvsig.wfs.app.mainplugin/src/main/java/org/gvsig/wfs/gui/panels/WFSAreaPanel.java
174 174
    /**
175 175
     * Write the view coordinates into the coordinates panel
176 176
     */
177
    private void initCoordinates(){
178
        AbstractViewPanel activeView = (AbstractViewPanel) PluginServices.getMDIManager().getActiveWindow();
177
    private void initCoordinates() {
178
        
179
        IWindow wi = PluginServices.getMDIManager().getActiveWindow();
180
        
181
        if (!(wi instanceof IView)) {
182
            return;
183
        }
184
        
179 185
        // We will use the adjusted extent because increases the usability
180
        Envelope envelope = activeView.getMapControl().getViewPort().getAdjustedExtent();
181
        //		Rectangle2D r2d = activeView.getMapControl().getViewPort().getExtent();
182

  
186
        Envelope envelope = ((IView) wi).getMapControl().getViewPort().getAdjustedEnvelope();
183 187
        if (envelope != null){
184 188
            previousExtentValids.put(new Rectangle2D.Double(envelope.getMinimum(0),
185 189
                envelope.getMinimum(1),

Also available in: Unified diff