Ticket #5216: multishort.patch

File multishort.patch, 1.8 KB (added by bilbo, 15 years ago)

Patch that fixes the shortcut

  • src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java

     
    3333 *
    3434 * New relation with type=multipolygon is created
    3535 *
    36  * If one or more of ways is already in relation with type=multipolygon or the
    37  * way is not closed, then error is reported and no relation is created
     36 * All ways must be either closed, or must form a closed loop along with
     37 * some other ways that are to form a multipolygon
     38 * Otherwise error is reported and no relation is created
    3839 *
    3940 * The "inner" and "outer" roles are guessed automatically. First, bbox is
    40  * calculated for each way. then the largest area is assumed to be outside and
    41  * the rest inside. In cases with one "outside" area and several cut-ins, the
     41 * calculated for each way (or set of ways forming a loop).
     42 * Then the largest area is assumed to be outside and the rest inside.
     43 * In cases with one "outside" area and several cut-ins, the
    4244 * guess should be always good ... In more complex (multiple outer areas) or
    4345 * buggy (inner and outer ways intersect) scenarios the result is likely to be
    4446 * wrong.
     
    4850    public CreateMultipolygonAction() {
    4951        super(tr("Create multipolygon"), "multipoly_create", tr("Create multipolygon."),
    5052                Shortcut.registerShortcut("tools:multipoly", tr("Tool: {0}", tr("Create multipolygon")),
    51                         KeyEvent.VK_A, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
     53                        KeyEvent.VK_M, Shortcut.GROUP_EDIT, KeyEvent.ALT_DOWN_MASK), true);
    5254    }
    5355    /**
    5456     * The action button has been clicked