Revision 43147 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/LayerPropertiesExtension.java
LayerPropertiesExtension.java | ||
---|---|---|
39 | 39 |
|
40 | 40 |
public class LayerPropertiesExtension extends Extension { |
41 | 41 |
|
42 |
@Override |
|
42 | 43 |
public void initialize() { |
43 | 44 |
} |
44 | 45 |
|
... | ... | |
51 | 52 |
viewManager.addTOCContextAction("layer-properties","group-last",10000,900); |
52 | 53 |
} |
53 | 54 |
|
55 |
@Override |
|
54 | 56 |
public void execute(String s) { |
55 | 57 |
|
56 | 58 |
ApplicationManager application = ApplicationLocator.getManager(); |
... | ... | |
60 | 62 |
return; |
61 | 63 |
} |
62 | 64 |
ViewDocument document = view.getViewDocument(); |
63 |
if (!document.getMapContext().hasActiveVectorLayers()) {
|
|
65 |
if (!document.getMapContext().hasActiveLayers()) { |
|
64 | 66 |
return; |
65 | 67 |
} |
66 | 68 |
|
... | ... | |
76 | 78 |
} |
77 | 79 |
} |
78 | 80 |
|
81 |
@Override |
|
79 | 82 |
public boolean isEnabled() { |
80 | 83 |
ApplicationManager application = ApplicationLocator.getManager(); |
81 | 84 |
|
... | ... | |
84 | 87 |
return false; |
85 | 88 |
} |
86 | 89 |
ViewDocument document = view.getViewDocument(); |
87 |
return document.getMapContext().hasActiveVectorLayers();
|
|
90 |
return document.getMapContext().hasActiveLayers(); |
|
88 | 91 |
} |
89 | 92 |
|
93 |
@Override |
|
90 | 94 |
public boolean isVisible() { |
91 | 95 |
ApplicationManager application = ApplicationLocator.getManager(); |
92 | 96 |
|
... | ... | |
95 | 99 |
return false; |
96 | 100 |
} |
97 | 101 |
ViewDocument document = view.getViewDocument(); |
98 |
return document.getMapContext().hasVectorLayers();
|
|
102 |
return document.getMapContext().hasLayers(); |
|
99 | 103 |
} |
100 | 104 |
|
101 | 105 |
} |
Also available in: Unified diff