Changeset 6037 in josm for trunk


Ignore:
Timestamp:
2013-06-27T20:26:18+02:00 (6 years ago)
Author:
akks
Message:

see #8470: extrude mode option - extrude.drag-nodes-without-ctrl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java

    r6008 r6037  
    6666     */
    6767    private boolean alwaysCreateNodes = false;
     68    private boolean nodeDragWithoutCtrl;
    6869
    6970    private long mouseDownTime = 0;
     
    210211        helperStrokeRA = new BasicStroke(1);
    211212        symbolSize = Main.pref.getDouble("extrude.angle-symbol-radius", 8);
    212        
     213        nodeDragWithoutCtrl = Main.pref.getBoolean("extrude.drag-nodes-without-ctrl", true);
    213214        oldLineStroke = GuiHelper.getCustomizedStroke(Main.pref.get("extrude.ctrl.stroke.old-line", "1"));
    214215        mainStroke = GuiHelper.getCustomizedStroke(Main.pref.get("extrude.stroke.main", "3"));
     
    248249       
    249250        if (selectedNode != null) {
    250             movingNodeList = new ArrayList<OsmPrimitive>();
    251             movingNodeList.add(selectedNode);
    252             calculatePossibleDirectionsByNode();
    253             if (possibleMoveDirections.isEmpty()) {
    254                 // if no directions fould, do not enter dragging mode
    255                 return;
     251            if (ctrl || nodeDragWithoutCtrl) {
     252                movingNodeList = new ArrayList<OsmPrimitive>();
     253                movingNodeList.add(selectedNode);
     254                calculatePossibleDirectionsByNode();
     255                if (possibleMoveDirections.isEmpty()) {
     256                    // if no directions fould, do not enter dragging mode
     257                    return;
     258                }
     259                mode = Mode.translate_node;
    256260            }
    257             mode = Mode.translate_node;
    258261        } else {
    259262            // Otherwise switch to another mode
Note: See TracChangeset for help on using the changeset viewer.