Changeset 35613 in osm for applications
- Timestamp:
- 2020-10-25T10:36:13+01:00 (4 years ago)
- Location:
- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/NodeWayUtils.java
r35470 r35613 395 395 } 396 396 } 397 for (Way w : newestWays) {398 newestNodes.removeAll(w.getNodes());399 // do not select nodes of already selected ways400 }401 402 397 filteredAddAll(newNodes, newestNodes); 403 398 newWays.addAll(newestWays); // already filtered … … 488 483 } 489 484 485 /** 486 * Compute ways inside selected polygons. 487 * @param selected the selected polygons and maybe other elements 488 * @param dataset the dataset 489 * @return ways inside selected polygons 490 */ 490 491 public static Collection<OsmPrimitive> selectAllInside(Collection<OsmPrimitive> selected, DataSet dataset) { 491 492 return selectAllInside(selected, dataset, true); 492 493 } 493 494 495 /** 496 * Compute elements (ways, nodes) inside selected polygons. 497 * @param selected the selected polygons and maybe other elements 498 * @param dataset the dataset 499 * @param ignoreNodesOfFoundWays if {@code true}, the result will not contain the nodes of the computed ways. 500 * @return ways inside selected polygons, if wanted also the nodes. 501 */ 494 502 public static Set<OsmPrimitive> selectAllInside(Collection<OsmPrimitive> selected, DataSet dataset, boolean ignoreNodesOfFoundWays) { 495 503 Set<Way> newWays = new HashSet<>(); -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectAllInsideAction.java
r35579 r35613 23 23 public class SelectAllInsideAction extends JosmAction { 24 24 25 /** 26 * Constructs a new {@code SelectAllInsideAction}. 27 */ 25 28 public SelectAllInsideAction() { 26 29 super(tr("All inside [testing]"), "selinside", tr("Select all inside selected polygons"), … … 33 36 public void actionPerformed(ActionEvent e) { 34 37 DataSet ds = getLayerManager().getActiveDataSet(); 35 Collection<OsmPrimitive> insideSelected = NodeWayUtils.selectAllInside(ds.getSelected(), ds, true);38 Collection<OsmPrimitive> insideSelected = NodeWayUtils.selectAllInside(ds.getSelected(), ds, false); 36 39 37 40 if (!insideSelected.isEmpty()) {
Note:
See TracChangeset
for help on using the changeset viewer.