Ignore:
Timestamp:
2016-03-13T00:38:12+01:00 (10 years ago)
Author:
Don-vip
Message:

sonar - code simplification

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r9954 r9976  
    13231323     * @param osm node to check
    13241324     * @param p point clicked
    1325      * @param use_selected whether to prefer selected nodes
     1325     * @param useSelected whether to prefer selected nodes
    13261326     * @return true, if the node fulfills the properties of the function body
    13271327     */
    1328     private boolean isPrecedenceNode(Node osm, Point p, boolean use_selected) {
     1328    private boolean isPrecedenceNode(Node osm, Point p, boolean useSelected) {
    13291329        if (osm != null) {
    1330             if (!(p.distanceSq(getPoint2D(osm)) > (4)*(4))) return true;
     1330            if (p.distanceSq(getPoint2D(osm)) <= (4*4)) return true;
    13311331            if (osm.isTagged()) return true;
    1332             if (use_selected && osm.isSelected()) return true;
     1332            if (useSelected && osm.isSelected()) return true;
    13331333        }
    13341334        return false;
Note: See TracChangeset for help on using the changeset viewer.