Changeset 8114 in josm for trunk/src


Ignore:
Timestamp:
2015-03-04T19:43:41+01:00 (5 years ago)
Author:
Don-vip
Message:

fix #11197 - don't select filtered ways with double-click selection mode

File:
1 edited

Legend:

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

    r7937 r8114  
    2020
    2121/**
    22  * This allows to select a polygon/multipolgon by an internal point.
     22 * This allows to select a polygon/multipolygon by an internal point.
     23 * @since 7144
    2324 */
    2425public class SelectByInternalPointAction extends JosmAction {
    2526
    2627    /**
    27      * Returns the surrounding polygons/multipolgons
     28     * Returns the surrounding polygons/multipolygons
    2829     * ordered by their area size (from small to large)
    2930     * which contain the internal point.
    3031     *
    3132     * @param internalPoint the internal point.
     33     * @return the surrounding polygons/multipolygons
    3234     */
    3335    public static Collection<OsmPrimitive> getSurroundingObjects(EastNorth internalPoint) {
     
    3941        final TreeMap<Double, OsmPrimitive> found = new TreeMap<>();
    4042        for (Way w : ds.getWays()) {
    41             if (w.isUsable() && w.isClosed()) {
     43            if (w.isUsable() && w.isClosed() && w.isSelectable()) {
    4244                if (Geometry.nodeInsidePolygon(n, w.getNodes())) {
    4345                    found.put(Geometry.closedWayArea(w), w);
     
    6870
    6971    /**
    70      * Returns the smallest surrounding polygon/multipolgon which contains the internal point.
     72     * Returns the smallest surrounding polygon/multipolygon which contains the internal point.
    7173     *
    7274     * @param internalPoint the internal point.
     75     * @return the smallest surrounding polygon/multipolygon
    7376     */
    7477    public static OsmPrimitive getSmallestSurroundingObject(EastNorth internalPoint) {
Note: See TracChangeset for help on using the changeset viewer.