Revision 341 trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/FFrameViewAddLayerExtension.java
FFrameViewAddLayerExtension.java | ||
---|---|---|
59 | 59 |
AddLayer plugin = (AddLayer) manager.getExtension(AddLayer.class); |
60 | 60 |
IFFrameUseFMap[] fframes = layout.getLayoutContext().getSelectedFFrames(IFFrameUseFMap.class); |
61 | 61 |
if (fframes.length>0) { |
62 |
plugin.addLayers(fframes[0].getMapContext()); |
|
63 |
fframes[0].refresh(); |
|
64 |
layout.getDocument().setModified(true); |
|
62 |
if (fframes[0].getMapContext()!=null) { |
|
63 |
plugin.addLayers(fframes[0].getMapContext()); |
|
64 |
fframes[0].refresh(); |
|
65 |
layout.getDocument().setModified(true); |
|
66 |
} |
|
65 | 67 |
} |
66 | 68 |
} |
67 | 69 |
} |
... | ... | |
79 | 81 |
return false; |
80 | 82 |
} |
81 | 83 |
IFFrameUseFMap[] fframes = l.getLayoutContext().getSelectedFFrames(IFFrameUseFMap.class); |
82 |
if (fframes.length==1 && !(fframes[0] instanceof FFrameOverView)) { |
|
84 |
if (fframes.length==1 && !(fframes[0] instanceof FFrameOverView) && ((IFFrameUseFMap)fframes[0]).getMapContext()!=null) {
|
|
83 | 85 |
return true; |
84 | 86 |
} |
85 | 87 |
} |
Also available in: Unified diff