Changeset 8131 in josm for trunk


Ignore:
Timestamp:
2015-03-09T23:37:29+01:00 (9 years ago)
Author:
Don-vip
Message:

fix #11220 - Search within selection shows incorrect number of matches

File:
1 edited

Legend:

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

    r8126 r8131  
    496496            if (s.mode == SearchMode.replace) {
    497497                sel.clear();
     498            } else if (s.mode == SearchMode.in_selection) {
     499                foundMatches = sel.size();
    498500            }
    499501
     
    504506                all = Main.main.getCurrentDataSet().allNonDeletedCompletePrimitives();
    505507            }
     508
    506509            for (OsmPrimitive osm : all) {
    507510                if (s.mode == SearchMode.replace) {
     
    516519                    sel.remove(osm);
    517520                    ++foundMatches;
    518                 } else if (s.mode == SearchMode.in_selection &&  p.evaluate(osm) && !matcher.match(osm)) {
     521                } else if (s.mode == SearchMode.in_selection && p.evaluate(osm) && !matcher.match(osm)) {
    519522                    sel.remove(osm);
    520                     ++foundMatches;
     523                    --foundMatches;
    521524                }
    522525            }
Note: See TracChangeset for help on using the changeset viewer.