Changeset 753 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2008-08-06T18:53:20+02:00 (16 years ago)
Author:
stoecker
Message:

no longer select relations and incomplete elements. Fixes #616.

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

Legend:

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

    r627 r753  
    1616
    1717        public void actionPerformed(ActionEvent e) {
    18                 Main.ds.setSelected(Main.ds.allNonDeletedPrimitives());
     18                Main.ds.setSelected(Main.ds.allNonDeletedPhysicalPrimitives());
    1919        }
    2020}
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r627 r753  
    8888                        Collection<OsmPrimitive> sel = Main.ds.getSelected();
    8989                        SearchCompiler.Match matcher = SearchCompiler.compile(search, caseSensitive);
    90                         for (OsmPrimitive osm : Main.ds.allNonDeletedPrimitives()) {
     90                        for (OsmPrimitive osm : Main.ds.allNonDeletedPhysicalPrimitives()) {
    9191                                if (mode == SearchMode.replace) {
    9292                                        if (matcher.match(osm))
  • trunk/src/org/openstreetmap/josm/data/osm/DataSet.java

    r746 r753  
    7878                for (OsmPrimitive osm : allPrimitives())
    7979                        if (!osm.deleted)
     80                                o.add(osm);
     81                return o;
     82        }
     83
     84        public Collection<OsmPrimitive> allNonDeletedPhysicalPrimitives() {
     85                Collection<OsmPrimitive> o = new LinkedList<OsmPrimitive>();
     86                for (OsmPrimitive osm : allPrimitives())
     87                        if (!osm.deleted && !osm.incomplete && !(osm instanceof Relation))
    8088                                o.add(osm);
    8189                return o;
Note: See TracChangeset for help on using the changeset viewer.