Ignore:
Timestamp:
2006-04-21T14:31:51+02:00 (18 years ago)
Author:
imi
Message:
  • added conflicts and resolve conflict dialog

This is one of those "changed everything" checkpoint.

File:
1 edited

Legend:

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

    r71 r86  
    1616
    1717import org.openstreetmap.josm.Main;
    18 import org.openstreetmap.josm.data.osm.LineSegment;
     18import org.openstreetmap.josm.data.osm.Segment;
    1919import org.openstreetmap.josm.data.osm.Node;
    2020import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    257257         * @param alt Whether the alt key was pressed, which means select all objects
    258258         *              that are touched, instead those which are completly covered. Also
    259          *              select whole ways instead of line segments.
     259         *              select whole ways instead of segments.
    260260         */
    261261        public Collection<OsmPrimitive> getObjectsInRectangle(Rectangle r, boolean alt) {
     
    272272                } else {
    273273                        // nodes
    274                         for (Node n : Main.main.ds.nodes) {
     274                        for (Node n : Main.ds.nodes) {
    275275                                if (r.contains(nc.getPoint(n.eastNorth)))
    276276                                        selection.add(n);
    277277                        }
    278278                       
    279                         // pending line segments
    280                         for (LineSegment ls : Main.main.ds.lineSegments)
    281                                 if (rectangleContainLineSegment(r, alt, ls))
     279                        // pending segments
     280                        for (Segment ls : Main.ds.segments)
     281                                if (rectangleContainSegment(r, alt, ls))
    282282                                        selection.add(ls);
    283283
    284284                        // ways
    285                         for (Way t : Main.main.ds.ways) {
     285                        for (Way t : Main.ds.ways) {
    286286                                boolean wholeWaySelected = !t.segments.isEmpty();
    287                                 for (LineSegment ls : t.segments)
    288                                         if (rectangleContainLineSegment(r, alt, ls))
     287                                for (Segment ls : t.segments)
     288                                        if (rectangleContainSegment(r, alt, ls))
    289289                                                selection.add(ls);
    290290                                        else
     
    300300
    301301        /**
    302          * Decide whether the line segment is in the rectangle Return
     302         * Decide whether the segment is in the rectangle Return
    303303         * <code>true</code>, if it is in or false if not.
    304304         *
    305          * @param r                     The rectangle, in which the line segment has to be.
     305         * @param r                     The rectangle, in which the segment has to be.
    306306         * @param alt           Whether user pressed the Alt key
    307          * @param ls            The line segment.
    308          * @return <code>true</code>, if the LineSegment was added to the selection.
    309          */
    310         private boolean rectangleContainLineSegment(Rectangle r, boolean alt, LineSegment ls) {
     307         * @param ls            The segment.
     308         * @return <code>true</code>, if the Segment was added to the selection.
     309         */
     310        private boolean rectangleContainSegment(Rectangle r, boolean alt, Segment ls) {
    311311                if (ls.incomplete)
    312312                        return false;
Note: See TracChangeset for help on using the changeset viewer.