Changeset 357 in josm for trunk/src/org


Ignore:
Timestamp:
2007-10-10T00:10:27+02:00 (17 years ago)
Author:
gebner
Message:

Add incompleteness checks for nodes.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/Way.java

    r343 r357  
    6363            return o instanceof Way ? Long.valueOf(id).compareTo(o.id) : -1;
    6464    }
    65        
     65
    6666        @Deprecated
    6767        public boolean isIncomplete() {
    68                 return false;
     68                return incomplete;
    6969        }
    7070}
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java

    r343 r357  
    9393         */
    9494        public void visit(Node n) {
     95                if (n.incomplete) return;
     96
    9597                Color color = null;
    9698                if (inactive)
     
    108110         */
    109111        public void visit(Way w) {
     112                if (w.incomplete) return;
     113
    110114                Color wayColor;
    111115                if (inactive)
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r343 r357  
    132132                Node minPrimitive = null;
    133133                for (Node n : Main.ds.nodes) {
    134                         if (n.deleted)
     134                        if (n.deleted || n.incomplete)
    135135                                continue;
    136136                        Point sp = getPoint(n.eastNorth);
  • trunk/src/org/openstreetmap/josm/gui/SelectionManager.java

    r343 r357  
    297297                        // nodes
    298298                        for (Node n : Main.ds.nodes) {
    299                                 if (!n.deleted && r.contains(nc.getPoint(n.eastNorth)))
     299                                if (!n.deleted && !n.incomplete && r.contains(nc.getPoint(n.eastNorth)))
    300300                                        selection.add(n);
    301301                        }
     
    303303                        // ways
    304304                        for (Way w : Main.ds.ways) {
    305                                 if (w.deleted || w.nodes.isEmpty())
     305                                if (w.deleted || w.nodes.isEmpty() || w.incomplete)
    306306                                                continue;
    307307                                if (alt) {
    308308                                        for (Node n : w.nodes) {
    309                                                 if (r.contains(nc.getPoint(n.eastNorth))) {
     309                                                if (!n.incomplete && r.contains(nc.getPoint(n.eastNorth))) {
    310310                                                        selection.add(w);
    311                                                 break;
     311                                                        break;
     312                                                }
    312313                                        }
    313                                 }
    314314                                } else {
    315315                                        boolean allIn = true;
    316316                                        for (Node n : w.nodes) {
    317                                                 if (!r.contains(nc.getPoint(n.eastNorth))) {
     317                                                if (!n.incomplete && !r.contains(nc.getPoint(n.eastNorth))) {
    318318                                                        allIn = false;
    319319                                                        break;
    320                         }
    321                 }
     320                                                }
     321                                        }
    322322                                        if (allIn) selection.add(w);
    323323                                }
    324         }
     324                        }
    325325                }
    326326                return selection;
Note: See TracChangeset for help on using the changeset viewer.