Ticket #2905: undo-move-dialog-2.patch
File undo-move-dialog-2.patch, 2.1 KB (added by , 16 years ago) |
---|
-
src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
442 442 s.add(osm); 443 443 s.addAll(((Way)osm).nodes); 444 444 } 445 if( s.size() > max)445 if(max != -1 && s.size() > max) 446 446 { 447 i f(1 != new ExtendedDialog(Main.parent, tr("Move elements"),448 tr("You did movemore than {0} elements. "447 int answer = new ExtendedDialog(Main.parent, tr("Move elements"), 448 tr("You moved more than {0} elements. " 449 449 + "Moving a large number of elements is often an error.\n" 450 450 + "Really move them?", max), 451 new String[] {tr("Move them"), tr("Undo move")}, 452 new String[] {"reorder.png", "cancel.png"}).getValue()) 453 { 451 new String[] {tr("Move them"), tr("Undo move"), tr("Don't show this warning again")}, 452 new String[] {"reorder.png", "cancel.png", "dialogs/delete.png"}).getValue(); 453 if (answer == 3) { 454 String msg = tr("You can re-enable this warning by deleting \"warn.move.maxelements\" in Advanced Preferences"); 455 JOptionPane.showMessageDialog(Main.parent, msg); 456 } else { 457 /* } else { because we also want to undo 458 * it if someone closes the dialog (answer 459 * == 0), not just if they press "Undo 460 * move" (answer == 2) */ 454 461 Main.main.undoRedo.undo(); 455 462 } 456 463 break;