Changeset 8728 in josm for trunk/src/org


Ignore:
Timestamp:
2015-09-04T10:25:30+02:00 (5 years ago)
Author:
simon04
Message:

Layer dialog: make duplicate and merge only accessible in context menu to have more space for more frequently used buttons

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java

    r8540 r8728  
    261261        opacityButton = new SideButton(layerOpacityAction, false);
    262262
    263         // -- merge layer action
    264         MergeAction mergeLayerAction = new MergeAction();
    265         adaptTo(mergeLayerAction, model);
    266         adaptTo(mergeLayerAction, selectionModel);
    267 
    268         // -- duplicate layer action
    269         DuplicateAction duplicateLayerAction = new DuplicateAction();
    270         adaptTo(duplicateLayerAction, model);
    271         adaptTo(duplicateLayerAction, selectionModel);
    272 
    273263        // -- delete layer action
    274264        DeleteLayerAction deleteLayerAction = new DeleteLayerAction();
     
    292282        InputMapUtils.addSpacebarAction(layerList, showHideLayerAction);
    293283
    294         createLayout(layerList, true, Arrays.asList(new SideButton[] {
     284        createLayout(layerList, true, Arrays.asList(
    295285                new SideButton(moveUpAction, false),
    296286                new SideButton(moveDownAction, false),
     
    298288                new SideButton(showHideLayerAction, false),
    299289                opacityButton,
    300                 new SideButton(mergeLayerAction, false),
    301                 new SideButton(duplicateLayerAction, false),
    302290                new SideButton(deleteLayerAction, false)
    303         }));
     291        ));
    304292
    305293        createVisibilityToggleShortcuts();
     
    16461634
    16471635    /**
     1636     * Creates a {@link DuplicateAction} for <code>layer</code> in the
     1637     * context of this {@link LayerListDialog}.
     1638     *
     1639     * @param layer the layer
     1640     * @return the action
     1641     */
     1642    public DuplicateAction createDuplicateLayerAction(Layer layer) {
     1643        return new DuplicateAction(layer);
     1644    }
     1645
     1646    /**
    16481647     * Returns the layer at given index, or {@code null}.
    16491648     * @param index the index
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r8565 r8728  
    521521                SeparatorLayerAction.INSTANCE,
    522522                LayerListDialog.getInstance().createMergeLayerAction(this),
     523                LayerListDialog.getInstance().createDuplicateLayerAction(this),
    523524                new LayerSaveAction(this),
    524525                new LayerSaveAsAction(this),
Note: See TracChangeset for help on using the changeset viewer.