Revision 9532 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/toc/actions/LayersUngroupTocMenuEntry.java
LayersUngroupTocMenuEntry.java | ||
---|---|---|
41 | 41 |
package com.iver.cit.gvsig.project.documents.view.toc.actions; |
42 | 42 |
|
43 | 43 |
import com.iver.andami.PluginServices; |
44 |
import com.iver.cit.gvsig.ProjectExtension; |
|
44 | 45 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
45 | 46 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
47 |
import com.iver.cit.gvsig.project.Project; |
|
46 | 48 |
import com.iver.cit.gvsig.project.documents.view.toc.AbstractTocContextMenuAction; |
47 | 49 |
import com.iver.cit.gvsig.project.documents.view.toc.ITocItem; |
48 | 50 |
|
... | ... | |
51 | 53 |
* |
52 | 54 |
* $Id$ |
53 | 55 |
* $Log$ |
54 |
* Revision 1.5 2006-10-02 13:52:34 jaume |
|
56 |
* Revision 1.6 2007-01-04 07:24:31 caballero |
|
57 |
* isModified |
|
58 |
* |
|
59 |
* Revision 1.5 2006/10/02 13:52:34 jaume |
|
55 | 60 |
* organize impots |
56 | 61 |
* |
57 | 62 |
* Revision 1.4 2006/09/25 15:24:26 jmvivo |
... | ... | |
108 | 113 |
|
109 | 114 |
|
110 | 115 |
public void execute(ITocItem item, FLayer[] selectedItems) { |
111 |
if (isTocItemBranch(item)){
|
|
116 |
if (isTocItemBranch(item)){ |
|
112 | 117 |
FLayers agrupa = (FLayers)getNodeLayer(item); |
113 | 118 |
FLayers parent=agrupa.getParentLayer(); |
114 |
|
|
119 |
|
|
115 | 120 |
if (parent!=null){ |
116 | 121 |
getMapContext().beginAtomicEvent(); |
117 | 122 |
while (agrupa.getLayersCount() > 0){ |
... | ... | |
121 | 126 |
} |
122 | 127 |
parent.removeLayer(agrupa); |
123 | 128 |
getMapContext().endAtomicEvent(); |
124 |
|
|
129 |
|
|
125 | 130 |
// TRUCO PARA REFRESCAR. |
126 | 131 |
getMapContext().invalidate(); |
132 |
Project project=((ProjectExtension)PluginServices.getExtension(ProjectExtension.class)).getProject(); |
|
133 |
project.setModified(true); |
|
127 | 134 |
|
128 |
}
|
|
135 |
} |
|
129 | 136 |
} |
130 | 137 |
} |
131 | 138 |
} |
Also available in: Unified diff