Revision 46505 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/MapContext.java

View differences:

MapContext.java
861 861
            LOGGER.error("While cloning order manager", e1);
862 862
        }
863 863

  
864
        FLayers aux = new FLayers();//(ret,null);
865
        aux.setMapContext(ret);
866 864
        for (int i = 0; i < antLayers.getLayersCount(); i++) {
867 865
            FLayer lyr = antLayers.getLayer(i);
868 866
            try {
869 867
                FLayer auxLayer = lyr.cloneLayer();
870
                aux.addLayer(auxLayer);
868
                ret.layers.addLayer(auxLayer);
871 869
                auxLayer.dispose();
872 870
            } catch (Exception e) {
873 871
                throw new RuntimeException(e);
874 872
            }
875 873
        }
876
        ret.layers = aux;
877 874
        return ret;
878 875

  
879 876
    }

Also available in: Unified diff