Revision 9532 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/toc/actions/EliminarCapaTocMenuEntry.java
EliminarCapaTocMenuEntry.java | ||
---|---|---|
61 | 61 |
* |
62 | 62 |
* $Id$ |
63 | 63 |
* $Log$ |
64 |
* Revision 1.2 2006-12-19 09:09:07 jmvivo |
|
64 |
* Revision 1.3 2007-01-04 07:24:31 caballero |
|
65 |
* isModified |
|
66 |
* |
|
67 |
* Revision 1.2 2006/12/19 09:09:07 jmvivo |
|
65 | 68 |
* Faltaba un beginAtomicEvent para que no refrescase cada vez |
66 | 69 |
* |
67 | 70 |
* Revision 1.1 2006/09/15 10:41:30 caballero |
... | ... | |
107 | 110 |
// Es necesario pulsar May?sculas a la vez que el bot?n derecho. |
108 | 111 |
|
109 | 112 |
FLayer[] actives = selectedItems; |
110 |
|
|
113 |
|
|
111 | 114 |
int option=-1; |
112 | 115 |
if (actives.length>0) { |
113 | 116 |
option=JOptionPane.showConfirmDialog((Component)PluginServices.getMainFrame(),PluginServices.getText(this,"desea_borrar_la_capa")); |
... | ... | |
117 | 120 |
if (option!=JOptionPane.OK_OPTION) |
118 | 121 |
return; |
119 | 122 |
getMapContext().beginAtomicEvent(); |
120 |
for (int i = actives.length-1; i>=0; i--){
|
|
123 |
for (int i = actives.length-1; i>=0; i--){ |
|
121 | 124 |
try { |
122 | 125 |
actives[i].getParentLayer().removeLayer(actives[i]); |
123 | 126 |
FLayers lyrs=getMapContext().getLayers(); |
... | ... | |
140 | 143 |
} |
141 | 144 |
|
142 | 145 |
//if (getMapContext().getLayers().getLayersCount()==0) |
143 |
|
|
146 |
|
|
144 | 147 |
} catch (CancelationException e1) { |
145 | 148 |
e1.printStackTrace(); |
146 | 149 |
} |
147 | 150 |
} |
148 | 151 |
getMapContext().endAtomicEvent(); |
152 |
Project project=((ProjectExtension)PluginServices.getExtension(ProjectExtension.class)).getProject(); |
|
153 |
project.setModified(true); |
|
149 | 154 |
PluginServices.getMainFrame().enableControls(); |
150 | 155 |
// 050209, jmorell: As? solo borra una capa (sobre la que pulsas). |
151 | 156 |
/*FLayer lyr = getNodeLayer(); |
Also available in: Unified diff