@@ -213,8 +213,9 @@ public void mouseClicked(MouseEvent e) {
213
213
new Notification (
214
214
tr ("Mode of Travel -> {0} \n total ways selected -> {1}" , modeOfTravel , edgeSet .size ()))
215
215
.setIcon (JOptionPane .INFORMATION_MESSAGE ).setDuration (1200 ).show ();
216
- ds .setSelected (edgeList );
217
- AutoScaleAction .zoomTo (edge .stream ().map (w -> (OsmPrimitive ) w ).collect (Collectors .toList ()));
216
+ ds .setSelected (edgeSet );
217
+ AutoScaleAction .zoomToSelection ();
218
+ AutoScaleAction .autoScale ("selection" );
218
219
}
219
220
220
221
} else if (!shift && ctrl && initial != null ) {
@@ -253,8 +254,10 @@ public void mouseClicked(MouseEvent e) {
253
254
Set <Way > edgeSet = new HashSet <>(edgeList );
254
255
new Notification (tr ("Mode of Travel -> {0} \n total ways selected -> {1}" , modeOfTravel , edgeSet .size ()))
255
256
.setIcon (JOptionPane .INFORMATION_MESSAGE ).setDuration (900 ).show ();
256
- ds .setSelected (edgeList );
257
- AutoScaleAction .zoomTo (edge .stream ().map (w -> (OsmPrimitive ) w ).collect (Collectors .toList ()));
257
+ ds .setSelected (edgeSet );
258
+ AutoScaleAction .zoomToSelection ();
259
+ AutoScaleAction .autoScale ("selection" );
260
+
258
261
} else if (shift && !ctrl && initial != null ) {
259
262
/*
260
263
* add new selection to existing edges
@@ -287,8 +290,9 @@ public void mouseClicked(MouseEvent e) {
287
290
new Notification (
288
291
tr ("Mode of Travel -> {0} \n total ways selected -> {1}" , modeOfTravel , edgeSet .size ()))
289
292
.setIcon (JOptionPane .INFORMATION_MESSAGE ).setDuration (900 ).show ();
290
- ds .setSelected (edgeList );
291
- AutoScaleAction .zoomTo (edge .stream ().map (w -> (OsmPrimitive ) w ).collect (Collectors .toList ()));
293
+ ds .setSelected (edgeSet );
294
+ AutoScaleAction .zoomToSelection ();
295
+ AutoScaleAction .autoScale ("selection" );
292
296
}
293
297
}
294
298
0 commit comments