Changeset 6069 in josm for trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
- Timestamp:
- 2013-07-17T00:01:07+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r6027 r6069 121 121 private Stroke rubberLineStroke; 122 122 private static final BasicStroke BASIC_STROKE = new BasicStroke(1); 123 123 124 124 public DrawAction(MapFrame mapFrame) { 125 125 super(tr("Draw"), "node/autonode", tr("Draw nodes"), … … 204 204 return; 205 205 super.enterMode(); 206 206 207 207 rubberLineColor = Main.pref.getColor(marktr("helper line"), null); 208 208 if (rubberLineColor == null) rubberLineColor = PaintColors.SELECTED.get(); 209 209 210 210 rubberLineStroke = GuiHelper.getCustomizedStroke(Main.pref.get("draw.stroke.helper-line","3")); 211 211 drawHelperLine = Main.pref.getBoolean("draw.helper-line", true); … … 773 773 updateKeyModifiers(e); 774 774 mousePos = e.getPoint(); 775 if (snapHelper.isSnapOn() && ctrl) 775 if (snapHelper.isSnapOn() && ctrl) 776 776 tryToSetBaseSegmentForAngleSnap(); 777 777 778 778 computeHelperLine(); 779 779 addHighlighting(); 780 780 } 781 781 782 782 /** 783 783 * This method is used to detect segment under mouse and use it as reference for angle snapping … … 888 888 currentBaseNode = null; 889 889 previousNode = null; 890 890 891 891 // Try to find an open way to measure angle from it. The way is not to be continued! 892 892 // warning: may result in changes of currentBaseNode and previousNode … … 895 895 for (OsmPrimitive p: selectedNode.getReferrers()) { 896 896 if (p.isUsable() && p instanceof Way && ((Way) p).isFirstLastNode(selectedNode)) { 897 if (selectedWay!=null) { // two uncontinued ways, nothing to take as reference 897 if (selectedWay!=null) { // two uncontinued ways, nothing to take as reference 898 898 selectedWay=null; 899 899 break; … … 904 904 } 905 905 } 906 } 907 906 } 907 908 908 if (selectedNode == null) { 909 909 if (selectedWay == null) … … 916 916 } 917 917 } 918 918 919 919 /** 920 920 * if one of the ends of @param way is given @param node , … … 1349 1349 JCheckBoxMenuItem checkBox; 1350 1350 public final Color ORANGE_TRANSPARENT = new Color(Color.ORANGE.getRed(),Color.ORANGE.getGreen(),Color.ORANGE.getBlue(),128); 1351 1351 1352 1352 public void init() { 1353 1353 snapOn=false;
Note:
See TracChangeset
for help on using the changeset viewer.