Changeset 15929 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2020-02-25T20:38:55+01:00 (5 years ago)
Author:
Don-vip
Message:

fix #18638 - Initialize the cycle layer actions in LayerListDialog (patch by taylor.smock)

File:
1 edited

Legend:

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

    r15734 r15929  
    5555import org.openstreetmap.josm.gui.SideButton;
    5656import org.openstreetmap.josm.gui.dialogs.layer.ActivateLayerAction;
     57import org.openstreetmap.josm.gui.dialogs.layer.CycleLayerDownAction;
     58import org.openstreetmap.josm.gui.dialogs.layer.CycleLayerUpAction;
    5759import org.openstreetmap.josm.gui.dialogs.layer.DeleteLayerAction;
    5860import org.openstreetmap.josm.gui.dialogs.layer.DuplicateAction;
     
    142144    private final ShowHideLayerAction showHideLayerAction;
    143145
     146    private final CycleLayerUpAction cycleLayerUpAction;
     147    private final CycleLayerDownAction cycleLayerDownAction;
     148
    144149    //TODO This duplicates ShowHide actions functionality
    145150    /** stores which layer index to toggle and executes the ShowHide action if the layer is present */
     
    330335        InputMapUtils.addSpacebarAction(layerList, showHideLayerAction);
    331336
     337        // Cycle layer actions
     338        cycleLayerUpAction = new CycleLayerUpAction();
     339        cycleLayerDownAction = new CycleLayerDownAction();
     340
    332341        createLayout(layerList, true, Arrays.asList(
    333342                new SideButton(moveUpAction, false),
     
    389398        ExpertToggleAction.removeExpertModeChangeListener(visibilityWidthListener);
    390399        layerManager.removeLayerChangeListener(visibilityWidthListener);
     400        cycleLayerUpAction.destroy();
     401        cycleLayerDownAction.destroy();
    391402        super.destroy();
    392403        instance = null;
Note: See TracChangeset for help on using the changeset viewer.