Changeset 12504 in josm


Ignore:
Timestamp:
2017-07-23T23:59:49+02:00 (2 years ago)
Author:
Don-vip
Message:

see #11924 - fix one deprecation warning for InputEvent.ALT_GRAPH_MASK

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/DeleteAction.java

    r10409 r12504  
    3232        if (!isEnabled() || !Main.map.mapView.isActiveLayerVisible())
    3333            return;
    34         org.openstreetmap.josm.actions.mapmode.DeleteAction.doActionPerformed(e);
     34        Main.map.mapModeDelete.doActionPerformed(e);
    3535    }
    3636
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java

    r11978 r12504  
    66import java.awt.Cursor;
    77import java.awt.event.ActionEvent;
    8 import java.awt.event.InputEvent;
    98import java.awt.event.KeyEvent;
    109import java.awt.event.MouseEvent;
     
    136135     * @param e Action event
    137136     */
    138     public static void doActionPerformed(ActionEvent e) {
     137    public void doActionPerformed(ActionEvent e) {
    139138        MainLayerManager lm = Main.getLayerManager();
    140139        OsmDataLayer editLayer = lm.getEditLayer();
     
    143142        }
    144143
    145         boolean ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0;
    146         boolean alt = (e.getModifiers() & (ActionEvent.ALT_MASK | InputEvent.ALT_GRAPH_MASK)) != 0;
     144        updateKeyModifiers(e.getModifiers());
    147145
    148146        Command c;
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r12391 r12504  
    173173    /** Zoom mode */
    174174    public final ZoomAction mapModeZoom;
     175    /** Delete mode */
     176    public final DeleteAction mapModeDelete;
    175177    /** Select Lasso mode */
    176178    public LassoModeAction mapModeSelectLasso;
     
    239241        mapModeDraw = new DrawAction();
    240242        mapModeZoom = new ZoomAction(this);
     243        mapModeDelete = new DeleteAction();
    241244
    242245        addMapMode(new IconToggleButton(mapModeSelect));
     
    244247        addMapMode(new IconToggleButton(mapModeDraw));
    245248        addMapMode(new IconToggleButton(mapModeZoom, true));
    246         addMapMode(new IconToggleButton(new DeleteAction(), true));
     249        addMapMode(new IconToggleButton(mapModeDelete, true));
    247250        addMapMode(new IconToggleButton(new ParallelWayAction(this), true));
    248251        addMapMode(new IconToggleButton(new ExtrudeAction(), true));
Note: See TracChangeset for help on using the changeset viewer.