Revision 24293

View differences:

trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/DefaultMapContextDrawer.java
69 69
		}
70 70

  
71 71

  
72
		CachedImage newCached = null;
72 73
		boolean cached=false;
73 74
		ComposedLayer composed = null;
74 75
		int pos;
......
117 118
							composed = null;
118 119

  
119 120
						}
120
						cachedImage = new CachedImage();
121
						cachedImage.setImage(image, mapContext, viewPort, pos-1);
121
						newCached = new CachedImage();
122
						newCached.setImage(image, mapContext, viewPort, pos-1);
122 123
						System.out.println("=======Guardando imagen de la pos "+ (layerPos-1)+"============");
123 124
					}
124 125
				}
......
173 174
		}
174 175

  
175 176
		this.previousDrawList = drawList;
177
		this.cachedImage= newCached;
176 178

  
177 179
	}
178 180

  
179 181
	private void draw(Object layerOrComposed,BufferedImage image, Graphics2D g, Cancellable cancel,
180 182
			double scale) throws ReadDriverException{
181 183
		ILabelable labelable= null;
184
		ILabelable tmp= null;
182 185
		if (layerOrComposed instanceof ILabelable){
183 186

  
184
			labelable =(ILabelable) layerOrComposed;
185
			if (!(labelable.isLabeled()
186
				&& labelable.getLabelingStrategy() != null
187
				&& labelable.getLabelingStrategy().shouldDrawLabels(scale))) {
188
				labelable = null;
187
			tmp =(ILabelable) layerOrComposed;
188

  
189
			if (tmp.isLabeled()
190
				&& tmp.getLabelingStrategy() != null
191
				&& tmp.getLabelingStrategy().shouldDrawLabels(scale)) {
192
				labelable =tmp;
189 193
			}
190 194
		}
191 195
		if (layerOrComposed instanceof FLayer){
......
204 208
	private void print(Object layerOrComposed,Graphics2D g, Cancellable cancel,
205 209
			double scale, PrintRequestAttributeSet properties) throws ReadDriverException{
206 210
		ILabelable labelable= null;
211
		ILabelable tmp= null;
207 212
		if (layerOrComposed instanceof ILabelable){
208 213

  
209
			labelable =(ILabelable) layerOrComposed;
210
			if (!(labelable.isLabeled()
211
				&& labelable.getLabelingStrategy() != null
212
				&& labelable.getLabelingStrategy().shouldDrawLabels(scale))) {
213
				labelable = null;
214
			tmp =(ILabelable) layerOrComposed;
215

  
216
			if (tmp.isLabeled()
217
				&& tmp.getLabelingStrategy() != null
218
				&& tmp.getLabelingStrategy().shouldDrawLabels(scale)) {
219
				labelable =tmp;
214 220
			}
215 221
		}
222

  
216 223
		if (layerOrComposed instanceof FLayer){
217 224
			FLayer layer = (FLayer) layerOrComposed;
218 225
			layer.print(g, viewPort, cancel, scale, properties);

Also available in: Unified diff