Changeset 15657 in josm for trunk/src/org


Ignore:
Timestamp:
2020-01-07T22:50:59+01:00 (5 years ago)
Author:
Don-vip
Message:

see #18514 - fix unit tests

Location:
trunk/src/org/openstreetmap/josm/actions/mapmode
Files:
2 edited

Legend:

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

    r15655 r15657  
    187187    private JCheckBoxMenuItem addMenuItem() {
    188188        int n = MainApplication.getMenu().editMenu.getItemCount();
    189         return MainMenu.addWithCheckbox(MainApplication.getMenu().editMenu, snapChangeAction, n-5, false);
     189        return MainMenu.addWithCheckbox(MainApplication.getMenu().editMenu, snapChangeAction, n >= 5 ? n-5 : -1, false);
    190190    }
    191191
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java

    r15655 r15657  
    245245    private JCheckBoxMenuItem addDualAlignMenuItem() {
    246246        int n = MainApplication.getMenu().editMenu.getItemCount();
    247         return MainMenu.addWithCheckbox(MainApplication.getMenu().editMenu, dualAlignChangeAction, n-5, false);
     247        return MainMenu.addWithCheckbox(MainApplication.getMenu().editMenu, dualAlignChangeAction, n >= 5 ? n-5 : -1, false);
    248248    }
    249249
Note: See TracChangeset for help on using the changeset viewer.