Revision 4144 trunk/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/CADToolAdapter.java
CADToolAdapter.java | ||
---|---|---|
142 | 142 |
Point2D mapHandlerAdjustedPoint) { |
143 | 143 |
// if (selection.cardinality() > 0) { |
144 | 144 |
if (getSpatialCache() == null) |
145 |
return Double.MAX_VALUE; |
|
145 |
return Double.MAX_VALUE;
|
|
146 | 146 |
|
147 | 147 |
double rw = getMapControl().getViewPort().toMapDistance(5); |
148 | 148 |
Point2D mapPoint = point; |
149 | 149 |
Rectangle2D r = new Rectangle2D.Double(mapPoint.getX() - rw / 2, |
150 | 150 |
mapPoint.getY() - rw / 2, rw, rw); |
151 | 151 |
|
152 |
// int[] indexes = vea.getRowsIndexes(r); |
|
152 |
// int[] indexes = vea.getRowsIndexes_OLD(r);
|
|
153 | 153 |
Envelope e = FConverter.convertRectangle2DtoEnvelope(r); |
154 | 154 |
List l = getSpatialCache().query(e); |
155 | 155 |
double min = Double.MAX_VALUE; |
... | ... | |
157 | 157 |
Point2D mapArgmin = null; |
158 | 158 |
|
159 | 159 |
for (int i = 0; i < l.size(); i++) { |
160 |
// for (int i = 0; i < indexes.length; i++) { |
|
160 | 161 |
IGeometry geometry = null; |
162 |
/* try { |
|
163 |
geometry = vea.getShape(indexes[i]); |
|
164 |
} catch (DriverIOException e1) { |
|
165 |
// TODO Auto-generated catch block |
|
166 |
e1.printStackTrace(); |
|
167 |
} */ |
|
161 | 168 |
geometry = (IGeometry) l.get(i);// getFeature(indexes[i]); |
162 | 169 |
Handler[] handlers = geometry.getHandlers(IGeometry.SELECTHANDLER); |
163 | 170 |
|
Also available in: Unified diff