Ticket #17401: 17401.patch
File 17401.patch, 859 bytes (added by , 6 years ago) |
---|
-
src/org/openstreetmap/josm/data/UndoRedoHandler.java
316 316 */ 317 317 public void afterAdd(List<? extends Command> cmds) { 318 318 if (cmds != null) { 319 for (Command cmd : cmds) { 320 fireEvent(new CommandAddedEvent(this, cmd)); 319 int n = cmds.size(); 320 // performance: only add the last commands if the list is longer than the max allowed 321 for (int i = Math.max(0, n - Config.getPref().getInt("undo.max", 1000)); i < n; i++) { 322 fireEvent(new CommandAddedEvent(this, cmds.get(i))); 321 323 } 322 324 } 323 325 fireCommandsChanged();