Changeset 12527 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-07-27T23:24:45+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
r12031 r12527 173 173 List<Node> selectedNodes = new ArrayList<>(ds.getSelectedNodes()); 174 174 List<Way> selectedWays = new ArrayList<>(ds.getSelectedWays()); 175 selectedWays.removeIf(OsmPrimitive::isIncomplete); 175 176 176 177 try { -
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r12463 r12527 107 107 // remove duplicates, preserving order 108 108 ways = new LinkedHashSet<>(ways); 109 // remove incomplete ways 110 ways.removeIf(OsmPrimitive::isIncomplete); 111 // we need at least two ways 112 if (ways.size() < 2) 113 return null; 109 114 110 115 List<DataSet> dataSets = ways.stream().map(Way::getDataSet).distinct().collect(Collectors.toList()); … … 245 250 int numWays = 0; 246 251 for (OsmPrimitive osm : selection) { 247 if (osm instanceof Way ) {248 numWays++;252 if (osm instanceof Way && !osm.isIncomplete() && ++numWays >= 2) { 253 break; 249 254 } 250 255 } -
trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
r12131 r12527 194 194 nodeList.add((Node) p); 195 195 } else if (p instanceof Way) { 196 wayDataList.add(new WayData(((Way) p).getNodes())); 196 if (!p.isIncomplete()) { 197 wayDataList.add(new WayData(((Way) p).getNodes())); 198 } 197 199 } else { 198 200 throw new InvalidUserInputException(tr("Selection must consist only of ways and nodes.")); -
trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java
r12356 r12527 10 10 import java.util.Collection; 11 11 import java.util.Collections; 12 import java.util.LinkedHashSet; 12 13 import java.util.LinkedList; 13 14 import java.util.List; … … 113 114 return; 114 115 115 final Collection<Way> sel = ds.getSelectedWays(); 116 final Collection<Way> sel = new LinkedHashSet<>(ds.getSelectedWays()); 117 sel.removeIf(w -> w.isIncomplete()); 116 118 if (sel.isEmpty()) { 117 119 new Notification( … … 163 165 @Override 164 166 protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) { 165 setEnabled(selection.stream().anyMatch( Way.class::isInstance));167 setEnabled(selection.stream().anyMatch(o -> o instanceof Way && !o.isIncomplete())); 166 168 } 167 169 } -
trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
r12386 r12527 102 102 try { 103 103 List<Way> ways = OsmPrimitive.getFilteredList(ds.getSelected(), Way.class); 104 ways.removeIf(OsmPrimitive::isIncomplete); 104 105 if (ways.isEmpty()) { 105 106 alertSelectAtLeastOneWay();
Note:
See TracChangeset
for help on using the changeset viewer.