- Timestamp:
- 2012-11-03T16:53:05+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r5512 r5555 378 378 Point curMousePos = e.getPoint(); 379 379 if (curMousePos.equals(rightClickPressPos)) { 380 WaySegment seg = Main.map.mapView.getNearestWaySegment(curMousePos, OsmPrimitive.isSelectablePredicate); 381 if (seg!=null) { 382 snapHelper.setBaseSegment(seg); 383 computeHelperLine(); 384 redrawIfRequired(); 385 } 380 tryToSetBaseSegmentForAngleSnap(); 386 381 } 387 382 return; … … 756 751 updateKeyModifiers(e); 757 752 mousePos = e.getPoint(); 758 753 if (snapHelper.isSnapOn() && ctrl) 754 tryToSetBaseSegmentForAngleSnap(); 755 759 756 computeHelperLine(); 760 757 addHighlighting(); 758 } 759 760 /** 761 * This method is used to detect segment under mouse and use it as reference for angle snapping 762 */ 763 private void tryToSetBaseSegmentForAngleSnap() { 764 WaySegment seg = Main.map.mapView.getNearestWaySegment(mousePos, OsmPrimitive.isSelectablePredicate); 765 if (seg!=null) { 766 snapHelper.setBaseSegment(seg); 767 } 761 768 } 762 769
Note:
See TracChangeset
for help on using the changeset viewer.