Revision 24190

View differences:

trunk/extensions/extRasterTools-SE/src/org/gvsig/fmap/raster/layers/RasterDrawStrategy.java
194 194
				li.hasTransparency = false;
195 195
			layersToPaint.put(rLyr, new Boolean(true));			
196 196
		}
197
		
197 198
		mapContextStrategy.put(mapContext, layersToPaint);
198 199
	}
199 200
	
201
		
200 202
	/**
201 203
	 * Obtiene la lista de capas del TOC. Si hay capas agrupadas lo tiene en cuenta y mira
202 204
	 * dentro de la agrupaci?n.
......
204 206
	 * @param destLyrs
205 207
	 * @return
206 208
	 */
207
	private ArrayList getLayerList(FLayers srcLyrs, ArrayList destLyrs) {
209
	public static ArrayList getLayerList(FLayers srcLyrs, ArrayList destLyrs) {
208 210
		for (int i = 0; i < srcLyrs.getLayersCount(); i++) {
209 211
			if(srcLyrs.getLayer(i) instanceof FLyrRasterSE)
210 212
				destLyrs.add(srcLyrs.getLayer(i));
trunk/extensions/extRasterTools-SE/src/org/gvsig/fmap/raster/layers/FLyrRasterSE.java
1696 1696
		else
1697 1697
			enableStopped();
1698 1698

  
1699
		if(isAwake() || isClosed())
1699
		if(isAwake() || isClosed()) {
1700 1700
			try {
1701 1701
				this.load();
1702 1702
			} catch (LoadLayerException e) {
1703 1703
				e.printStackTrace();
1704 1704
			}
1705
		}
1706

  
1707
		/*
1708
		 * Cuando se modifica la visibilidad de una capa raster se hace un updateDrawVersion de todas las
1709
		 * capas raster de ese MapContext. Esto es porque la estrategia utilizada por RasterDrawStrategy hace
1710
		 * que se cacheen en blanco las capas raster que est?n ocultas debajo de otras. Al hacer invisibles las
1711
		 * de arriba la cache que estaba en blanco hace que no se pinte nada. Para evitar esto las marcamos todas
1712
		 * como que han sido modificadas para que se vuelvan a leer.
1713
		 */
1714
		if(getMapContext() != null) {
1715
			ArrayList listLayers = new ArrayList();
1716
			listLayers = RasterDrawStrategy.getLayerList(getMapContext().getLayers(), listLayers);
1717
			for (int i = 0; i < listLayers.size(); i++) {
1718
				if(listLayers.get(i) instanceof FLyrRasterSE)
1719
					((FLyrRasterSE)listLayers.get(i)).updateDrawVersion();
1720
			}
1721
		}
1722

  
1705 1723
		super.setVisible(visibility);
1706 1724
	}
1707 1725

  
......
1859 1877
	 * @see org.gvsig.raster.grid.render.VisualPropertyListener#actionValueChanged(org.gvsig.raster.grid.render.VisualPropertyEvent)
1860 1878
	 */
1861 1879
	public void visualPropertyValueChanged(VisualPropertyEvent e) {
1862
		updateDrawVersion();
1880
		//updateDrawVersion();
1863 1881
	}
1864 1882
	
1865 1883
	/*****************************************************/

Also available in: Unified diff