Changeset 3143 in josm for trunk


Ignore:
Timestamp:
2010-03-18T20:42:21+01:00 (10 years ago)
Author:
bastiK
Message:

limit the size of the undo stack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java

    r2975 r3143  
    3838        c.executeCommand();
    3939        commands.add(c);
     40        // Limit the number of commands in the undo list.
     41        // Currently you have to undo the commands one by one. If
     42        // this changes, a higher default value may be reasonable.
     43        if (commands.size() > Main.pref.getInteger("undo.max", 1000)) {
     44            commands.removeFirst();
     45        }
    4046        redoCommands.clear();
    4147    }
Note: See TracChangeset for help on using the changeset viewer.