Changeset 28167 in osm for applications/editors


Ignore:
Timestamp:
2012-03-30T19:47:33+02:00 (13 years ago)
Author:
akks
Message:

'FastDraw: better shortcut handling after core changes'

Location:
applications/editors/josm/plugins/FastDraw
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/FastDraw/build.xml

    r27981 r28167  
    3030<project name="FastDraw" default="dist" basedir=".">
    3131    <!-- enter the SVN commit message -->
    32     <property name="commit.message" value="FastDraw: shortcut parsing"/>
     32    <property name="commit.message" value="FastDraw: better shortcut handling after core changes"/>
    3333    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    3434    <property name="plugin.main.version" value="5035"/>
  • applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java

    r27852 r28167  
    9090    private boolean lineWasSaved;
    9191    private boolean deltaChanged;
    92 
     92    private final int mainKeyCode;
     93   
    9394    FastDrawingMode(MapFrame mapFrame) {
    9495        super(tr("FastDrawing"), "turbopen.png", tr("Fast drawing mode"),
     
    103104        cursorDrawing = ImageProvider.getCursor("crosshair", "mode");
    104105        //loadPrefs();
     106        mainKeyCode = getShortcut().getKeyStroke().getKeyCode();
    105107    }
    106108
     
    429431
    430432    private void doKeyEvent(KeyEvent e) {
    431        // System.out.println(e);
     433        if (getShortcut().isEvent(e)) { // repeated press
     434            tryToLoadWay();
     435            return;
     436        }
    432437        switch(e.getKeyCode()) {
    433438        case KeyEvent.VK_BACK_SPACE:
     
    464469        break;
    465470        case KeyEvent.VK_DOWN:
     471            if (ctrl || shift || alt) return;
    466472            // more details
    467473            e.consume();
     
    470476        break;
    471477        case KeyEvent.VK_UP:
     478            if (ctrl || shift || alt) return;
    472479            // less details
    473480            e.consume();
     
    494501            }
    495502        break;
    496         case KeyEvent.VK_T:
    497             tryToLoadWay();
    498         break;
     503       
    499504        case KeyEvent.VK_I:
    500505           JOptionPane.showMessageDialog(Main.parent,
Note: See TracChangeset for help on using the changeset viewer.