Revision 290
trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/FFrameViewZoomPrev.java | ||
---|---|---|
8 | 8 |
import org.gvsig.app.project.documents.layout.fframes.IFFrameUseFMap; |
9 | 9 |
import org.gvsig.app.project.documents.layout.gui.LayoutPanel; |
10 | 10 |
import org.gvsig.fmap.mapcontext.ExtentHistory; |
11 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
11 | 12 |
import org.gvsig.fmap.mapcontext.ViewPort; |
12 | 13 |
|
13 | 14 |
|
... | ... | |
30 | 31 |
IFFrameUseFMap[] fframes = l.getLayoutContext().getSelectedFFrames(IFFrameUseFMap.class); |
31 | 32 |
if (fframes.length==1 && !(fframes[0] instanceof FFrameOverView)) { |
32 | 33 |
IFFrameUseFMap fframeView = (IFFrameUseFMap) fframes[0]; |
33 |
ExtentHistory history = fframeView.getMapContext().getViewPort().getEnvelopes(); |
|
34 |
if (history.hasPrevious()&&fframeView.getScaleType()==IFFrameUseFMap.SCALE_TYPE.NORMAL) { |
|
35 |
return true; |
|
34 |
MapContext mc = fframeView.getMapContext(); |
|
35 |
if (mc!=null) { |
|
36 |
ExtentHistory history = mc.getViewPort().getEnvelopes(); |
|
37 |
if (history.hasPrevious()&&fframeView.getScaleType()==IFFrameUseFMap.SCALE_TYPE.NORMAL) { |
|
38 |
return true; |
|
39 |
} |
|
36 | 40 |
} |
37 | 41 |
} |
38 | 42 |
} |
Also available in: Unified diff