Revision 1729 branches/gvSIG_CAD_Layout_version/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/tools/SelectionCadTool.java
SelectionCadTool.java | ||
---|---|---|
133 | 133 |
// handlerPoint.getY())) { |
134 | 134 |
double distance = firstPoint.distance(handlerPoint); |
135 | 135 |
|
136 |
if ((distance <= min) && (distance < tolerance)) {
|
|
136 |
if ((distance <= min) && (distance < getCadToolAdapter().toDistance(SelectionCadTool.tolerance))) {
|
|
137 | 137 |
if (distance < min) { |
138 | 138 |
selectedGeometry.clear(); |
139 | 139 |
selectedGeometryIndex.clear(); |
... | ... | |
170 | 170 |
// Se comprueba si se pincha en una gemometr?a |
171 | 171 |
PluginServices.getMDIManager().setWaitCursor(); |
172 | 172 |
|
173 |
double tam = getCadToolAdapter().getMapControl().getViewPort() |
|
174 |
.toMapDistance(SelectionCadTool.tolerance); |
|
173 |
double tam = getCadToolAdapter().toDistance(SelectionCadTool.tolerance); |
|
175 | 174 |
Rectangle2D rect = new Rectangle2D.Double(firstPoint.getX() - |
176 | 175 |
tam, firstPoint.getY() - tam, tam*2, tam*2); |
177 | 176 |
int[] indexes = editingSource.getGeometriesIndexes(rect); |
... | ... | |
303 | 302 |
elShape.lineTo(firstPoint.getX(), y); |
304 | 303 |
elShape.lineTo(firstPoint.getX(), firstPoint.getY()); |
305 | 304 |
ShapeFactory.createPolyline2D(elShape).draw((Graphics2D) g, |
306 |
getCadToolAdapter().getMapControl().getViewPort(),
|
|
305 |
getAT(),
|
|
307 | 306 |
CadTool.selectSymbol); |
308 | 307 |
} else if (status == 4) { |
309 | 308 |
for (int i = 0; i < selectedGeometry.size(); i++) { |
... | ... | |
313 | 312 |
g.setColor(Color.gray); |
314 | 313 |
h.set(x, y); |
315 | 314 |
geom.draw((Graphics2D) g, |
316 |
getCadToolAdapter().getCadMapControl().getMapControl() |
|
317 |
.getViewPort(), CadTool.modifySymbol); |
|
315 |
getAT(), CadTool.modifySymbol); |
|
318 | 316 |
} |
319 | 317 |
} |
320 | 318 |
} |
Also available in: Unified diff