Changeset 7009 in josm


Ignore:
Timestamp:
2014-04-27T12:43:55+02:00 (10 years ago)
Author:
akks
Message:

see #9952: added parameter extrude.initial-move-threshold (to tune ignoring small movements in extrude mode)

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

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

    r7005 r7009  
    112112    private int initialMoveDelay = 200;
    113113    /**
     114     * The minimal shift of mouse (in pixels) befire something counts as move
     115     */
     116    private int initialMoveThreshold = 10;
     117
     118    /**
    114119     * The initial EastNorths of node1 and node2
    115120     */
     
    209214        }
    210215        initialMoveDelay = Main.pref.getInteger("edit.initial-move-delay",200);
     216        initialMoveThreshold = Main.pref.getInteger("extrude.initial-move-threshold", 10);
    211217        mainColor = Main.pref.getColor(marktr("Extrude: main line"), null);
    212218        if (mainColor == null) mainColor = PaintColors.SELECTED.get();
     
    362368        } else {
    363369            if (mode == Mode.create_new) {
    364                 if (e.getPoint().distance(initialMousePos) > 10 && newN1en != null) {
     370                if (e.getPoint().distance(initialMousePos) > initialMoveThreshold && newN1en != null) {
    365371                    createNewRectangle();
    366372                }
     
    370376                    addNewNode(e);
    371377                }
    372                 else if (e.getPoint().distance(initialMousePos) > 10 && newN1en != null && selectedSegment != null) {
     378                else if (e.getPoint().distance(initialMousePos) > initialMoveThreshold && newN1en != null && selectedSegment != null) {
    373379                    // main extrusion commands
    374380                    performExtrusion();
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r7005 r7009  
    174174        putValue("help", ht("/Action/Select"));
    175175        selectionManager = new SelectionManager(this, false, mv);
    176         initialMoveDelay = Main.pref.getInteger("edit.initial-move-delay", 200);
    177         initialMoveThreshold = Main.pref.getInteger("edit.initial-move-threshold", 5);
    178176    }
    179177
     
    185183        mv.setVirtualNodesEnabled(Main.pref.getInteger("mappaint.node.virtual-size", 8) != 0);
    186184        drawTargetHighlight = Main.pref.getBoolean("draw.target-highlight", true);
     185        initialMoveDelay = Main.pref.getInteger("edit.initial-move-delay", 200);
     186        initialMoveThreshold = Main.pref.getInteger("edit.initial-move-threshold", 5);
    187187        cycleManager.init();
    188188        virtualManager.init();
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r7005 r7009  
    7575    private static final int MILLIS_OF_DAY = 86400000;
    7676
    77     // Should us keep "%" character when fixing URL or encode it? Let us keep them for now, see #9937
    7877    public static final String URL_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~:/?#[]@!$&'()*+,;=%";
    7978
Note: See TracChangeset for help on using the changeset viewer.