Revision 10721 branches/v10/applications/appgvSIG/src/com/iver/cit/gvsig/ClearSelectionExtension.java
ClearSelectionExtension.java | ||
---|---|---|
59 | 59 |
import com.iver.cit.gvsig.project.documents.table.ProjectTable; |
60 | 60 |
import com.iver.cit.gvsig.project.documents.table.gui.Table; |
61 | 61 |
import com.iver.cit.gvsig.project.documents.view.IProjectView; |
62 |
import com.iver.cit.gvsig.project.documents.view.gui.View; |
|
62 |
import com.iver.cit.gvsig.project.documents.view.gui.BaseView;
|
|
63 | 63 |
|
64 | 64 |
|
65 | 65 |
/** |
... | ... | |
76 | 76 |
boolean refresh = false; |
77 | 77 |
com.iver.andami.ui.mdiManager.IWindow view =PluginServices.getMDIManager().getActiveWindow(); |
78 | 78 |
|
79 |
if (view instanceof View){ |
|
80 |
View vista = (View) view;
|
|
79 |
if (view instanceof BaseView){
|
|
80 |
BaseView vista = (BaseView) view;
|
|
81 | 81 |
IProjectView model = vista.getModel(); |
82 | 82 |
MapContext mapa = model.getMapContext(); |
83 | 83 |
MapControl mapCtrl = vista.getMapControl(); |
... | ... | |
139 | 139 |
if (view == null) { |
140 | 140 |
return false; |
141 | 141 |
} |
142 |
if (view instanceof View) { |
|
143 |
MapContext mapa = ((View) view).getModel().getMapContext(); |
|
142 |
if (view instanceof BaseView) {
|
|
143 |
MapContext mapa = ((BaseView) view).getModel().getMapContext();
|
|
144 | 144 |
return mapa.getLayers().getLayersCount() > 0; |
145 | 145 |
} |
146 | 146 |
if (view instanceof Table) { |
... | ... | |
158 | 158 |
if (view == null) { |
159 | 159 |
return false; |
160 | 160 |
} |
161 |
if (view instanceof View){ |
|
162 |
MapContext mapa = ((View) view).getMapControl().getMapContext(); |
|
161 |
if (view instanceof BaseView){
|
|
162 |
MapContext mapa = ((BaseView) view).getMapControl().getMapContext();
|
|
163 | 163 |
return hasVectorLayersWithSelection(mapa.getLayers()); |
164 | 164 |
} |
165 | 165 |
if (view instanceof Table){ |
Also available in: Unified diff