Changeset 2760 in josm for trunk


Ignore:
Timestamp:
2010-01-07T19:55:30+01:00 (10 years ago)
Author:
mjulius
Message:

fixes #4308 - zoom undo buffer size limited to 50 by default

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r2759 r2760  
    387387    private void pushZoomUndo(EastNorth center, double scale) {
    388388        Date now = new Date();
    389         if ((now.getTime() - zoomTimestamp.getTime()) > (Main.pref.getDouble("zoom.delay", 1.0) * 1000)) {
     389        if ((now.getTime() - zoomTimestamp.getTime()) > (Main.pref.getDouble("zoom.undo.delay", 1.0) * 1000)) {
    390390            zoomUndoBuffer.push(new ZoomData(center, scale));
     391            if (zoomUndoBuffer.size() > Main.pref.getInteger("zoom.undo.max", 50)) {
     392                zoomUndoBuffer.poll();
     393            }
    391394            zoomRedoBuffer.clear();
    392395        }
Note: See TracChangeset for help on using the changeset viewer.