Ticket #2905: undo-move-dialog.patch
File undo-move-dialog.patch, 1.8 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()) 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 == 2) 453 454 { 454 455 Main.main.undoRedo.undo(); 456 } else if (answer == 3) { 457 Main.pref.putInteger("warn.move.maxelements", -1); 455 458 } 456 459 break; 457 460 }