Revision 24263 branches/v2_0_0_prep/extensions/extCAD/src/com/iver/cit/gvsig/BreakExtension.java
BreakExtension.java | ||
---|---|---|
40 | 40 |
*/ |
41 | 41 |
package com.iver.cit.gvsig; |
42 | 42 |
|
43 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
43 | 44 |
import org.gvsig.fmap.data.exceptions.ReadException; |
45 |
import org.gvsig.fmap.data.feature.FeatureSelection; |
|
44 | 46 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
45 | 47 |
import org.gvsig.fmap.mapcontrol.MapControl; |
46 | 48 |
|
... | ... | |
105 | 107 |
return false; |
106 | 108 |
FLyrVect lv=(FLyrVect)em.getActiveLayerEdited().getLayer(); |
107 | 109 |
|
108 |
if (lv.getFeatureStore().getSelection().size()!=1)
|
|
110 |
if (((FeatureSelection)lv.getFeatureStore().getSelection()).getSize()!=1)
|
|
109 | 111 |
return false; |
110 | 112 |
if (breakCADTool.isApplicable(lv.getShapeType())){ |
111 | 113 |
return true; |
... | ... | |
113 | 115 |
} |
114 | 116 |
} catch (ReadException e) { |
115 | 117 |
NotificationManager.addError(e.getMessage(),e); |
118 |
} catch (DataException e) { |
|
119 |
NotificationManager.addError(e.getMessage(),e); |
|
116 | 120 |
} |
117 | 121 |
return false; |
118 | 122 |
} |
Also available in: Unified diff