Revision 24263 branches/v2_0_0_prep/extensions/extCAD/src/com/iver/cit/gvsig/EquidistanceExtension.java
EquidistanceExtension.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 |
|
... | ... | |
104 | 106 |
return false; |
105 | 107 |
FLyrVect lv=(FLyrVect)em.getActiveLayerEdited().getLayer(); |
106 | 108 |
|
107 |
if (lv.getFeatureStore().getSelection().size()!=1)
|
|
109 |
if (((FeatureSelection)lv.getFeatureStore().getSelection()).getSize()!=1)
|
|
108 | 110 |
return false; |
109 | 111 |
if (equidistanceCADTool.isApplicable(lv.getShapeType())){ |
110 | 112 |
return true; |
... | ... | |
112 | 114 |
} |
113 | 115 |
} catch (ReadException e) { |
114 | 116 |
NotificationManager.addError(e.getMessage(),e); |
117 |
} catch (DataException e) { |
|
118 |
NotificationManager.addError(e.getMessage(),e); |
|
115 | 119 |
} |
116 | 120 |
return false; |
117 | 121 |
} |
Also available in: Unified diff