Ignore:
Timestamp:
2011-02-01T01:49:32+01:00 (14 years ago)
Author:
framm
Message:

new viewport following function; moves the viewport so that the last placed
node is in the center. the idea is to greatly improve tracing of long, linear
features from imagery or tracks (no need to right-click and pan all the time),
however the execution still leaves to be desired; problem is that after you
have placed a node you have to wait for the movement to finish before you can
place the next node. possible enhancements: only scroll if placed node is on
the outer rim of viewport?

File:
1 edited

Legend:

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

    r3737 r3837  
    7474import org.openstreetmap.josm.actions.UploadAction;
    7575import org.openstreetmap.josm.actions.UploadSelectionAction;
     76import org.openstreetmap.josm.actions.ViewportFollowToggleAction;
    7677import org.openstreetmap.josm.actions.WireframeToggleAction;
    7778import org.openstreetmap.josm.actions.ZoomInAction;
     
    286287        }
    287288
     289        // -- viewport follow toggle action
     290        ViewportFollowToggleAction viewportFollowToggleAction = new ViewportFollowToggleAction();
     291        final JCheckBoxMenuItem vft = new JCheckBoxMenuItem(viewportFollowToggleAction);
     292        viewMenu.add(vft);
     293        vft.setAccelerator(viewportFollowToggleAction.getShortcut().getKeyStroke());
     294        viewportFollowToggleAction.addButtonModel(vft.getModel());
     295
    288296        // -- changeset manager toggle action
    289297        ChangesetManagerToggleAction changesetManagerToggleAction = new ChangesetManagerToggleAction();
Note: See TracChangeset for help on using the changeset viewer.