Changeset 34246 in osm for applications/editors/josm/plugins/pt_assistant
- Timestamp:
- 2018-06-04T12:08:59+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/EdgeSelectionAction.java
r34228 r34246 13 13 import java.util.stream.Collectors; 14 14 15 import javax.swing.JOptionPane; 16 15 17 import org.openstreetmap.josm.actions.AutoScaleAction; 16 18 import org.openstreetmap.josm.actions.mapmode.MapMode; … … 21 23 import org.openstreetmap.josm.data.osm.Way; 22 24 import org.openstreetmap.josm.gui.MainApplication; 25 import org.openstreetmap.josm.gui.Notification; 23 26 import org.openstreetmap.josm.gui.dialogs.relation.sort.RelationSorter; 24 27 import org.openstreetmap.josm.gui.layer.Layer; … … 155 158 156 159 Way theChoosenOne = null; 157 158 // if ("bus".equals(modeOfTravel)) {159 //160 // }161 // if ("tram".equals(modeOfTravel)) {162 //163 // }164 160 165 161 return theChoosenOne; … … 202 198 } 203 199 edgeList.addAll(edge); 200 // set for a more accurate count 201 Set<Way> edgeSet = new HashSet<>(edgeList); 202 new Notification( 203 tr("Mode of Travel -> {0} \n total ways selected -> {1}", modeOfTravel, edgeSet.size())) 204 .setIcon(JOptionPane.INFORMATION_MESSAGE).setDuration(1200).show(); 204 205 ds.setSelected(edgeList); 205 206 AutoScaleAction.zoomTo(edge.stream().map(w -> (OsmPrimitive) w).collect(Collectors.toList())); … … 229 230 } 230 231 if (newEdges != null) { 231 System.out.println("new"+newEdges.size());232 232 List<Way> waysToBeRemoved = waysToBeRemoved(newEdges); 233 233 if (waysToBeRemoved != null) { … … 238 238 } 239 239 ds.clearSelection(); 240 Set<Way> edgeSet = new HashSet<>(edgeList); 241 new Notification(tr("Mode of Travel -> {0} \n total ways selected -> {1}", modeOfTravel, edgeSet.size())) 242 .setIcon(JOptionPane.INFORMATION_MESSAGE).setDuration(900).show(); 240 243 ds.setSelected(edgeList); 241 244 AutoScaleAction.zoomTo(edge.stream().map(w -> (OsmPrimitive) w).collect(Collectors.toList())); … … 259 262 260 263 if (newEdges != null) { 261 System.out.println("new"+newEdges.size());262 264 List<Way> waysToBeRemoved = waysToBeRemoved(newEdges); 263 265 if (waysToBeRemoved != null) { … … 267 269 } 268 270 271 Set<Way> edgeSet = new HashSet<>(edgeList); 272 new Notification( 273 tr("Mode of Travel -> {0} \n total ways selected -> {1}", modeOfTravel, edgeSet.size())) 274 .setIcon(JOptionPane.INFORMATION_MESSAGE).setDuration(900).show(); 269 275 ds.setSelected(edgeList); 270 276 AutoScaleAction.zoomTo(edge.stream().map(w -> (OsmPrimitive) w).collect(Collectors.toList())); … … 301 307 } 302 308 } 303 System.out.println("remove"+waysToBeRemoved.size());304 309 return waysToBeRemoved; 305 310 }
Note:
See TracChangeset
for help on using the changeset viewer.