Revision 5256 trunk/extensions/extCAD/src/com/iver/cit/gvsig/EditionManager.java
EditionManager.java | ||
---|---|---|
8 | 8 |
import com.iver.cit.gvsig.fmap.edition.VectorialEditableAdapter; |
9 | 9 |
import com.iver.cit.gvsig.fmap.layers.CancelationException; |
10 | 10 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
11 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
|
11 | 12 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
12 | 13 |
import com.iver.cit.gvsig.fmap.layers.LayerCollectionEvent; |
13 | 14 |
import com.iver.cit.gvsig.fmap.layers.LayerCollectionListener; |
... | ... | |
200 | 201 |
|
201 | 202 |
public void layerRemoved(LayerCollectionEvent e) { |
202 | 203 |
VectorialLayerEdited vle=(VectorialLayerEdited)getActiveLayerEdited(); |
203 |
FLyrVect lv=(FLyrVect)vle.getLayer(); |
|
204 |
if (e.getAffectedLayer().equals(lv)){ |
|
205 |
View view=(View)PluginServices.getMDIManager().getActiveView(); |
|
206 |
view.hideConsole(); |
|
207 |
view.validate(); |
|
208 |
view.repaint(); |
|
204 |
if (vle!=null){ |
|
205 |
FLayers layers=getMapControl().getMapContext().getLayers(); |
|
206 |
if (layers.getLayersCount()>0) |
|
207 |
layers.getLayer(0).setActive(true); |
|
208 |
vle.clearSelection(); |
|
209 |
FLyrVect lv=(FLyrVect)vle.getLayer(); |
|
210 |
if (e.getAffectedLayer().equals(lv)){ |
|
211 |
View view=(View)PluginServices.getMDIManager().getActiveView(); |
|
212 |
view.hideConsole(); |
|
213 |
view.validate(); |
|
214 |
view.repaint(); |
|
215 |
} |
|
216 |
PluginServices.getMainFrame().enableControls(); |
|
209 | 217 |
} |
210 | 218 |
|
211 | 219 |
} |
Also available in: Unified diff