Ignore:
Timestamp:
2024-05-07T18:15:53+02:00 (13 days ago)
Author:
stoecker
Message:

fix deprecation warnings

File:
1 edited

Legend:

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

    r18759 r19074  
    186186     */
    187187    private static int mapOldModifiers(int modifiers) {
    188         if ((modifiers & InputEvent.CTRL_MASK) != 0) {
     188        if ((modifiers & ActionEvent.CTRL_MASK) != 0) {
    189189            modifiers |= InputEvent.CTRL_DOWN_MASK;
    190190        }
    191         if ((modifiers & InputEvent.META_MASK) != 0) {
     191        if ((modifiers & ActionEvent.META_MASK) != 0) {
    192192            modifiers |= InputEvent.META_DOWN_MASK;
    193193        }
    194         if ((modifiers & InputEvent.ALT_MASK) != 0) {
     194        if ((modifiers & ActionEvent.ALT_MASK) != 0) {
    195195            modifiers |= InputEvent.ALT_DOWN_MASK;
    196196        }
     197        /* Old modifier in InputEvent is deprecated, but ActionEvent has no ALT_GRAPH */
    197198        if ((modifiers & InputEvent.ALT_GRAPH_MASK) != 0) {
    198199            modifiers |= InputEvent.ALT_GRAPH_DOWN_MASK;
    199200        }
    200         if ((modifiers & InputEvent.SHIFT_MASK) != 0) {
     201        if ((modifiers & ActionEvent.SHIFT_MASK) != 0) {
    201202            modifiers |= InputEvent.SHIFT_DOWN_MASK;
    202203        }
Note: See TracChangeset for help on using the changeset viewer.