Changeset 10478 in josm


Ignore:
Timestamp:
2016-06-24T10:10:18+02:00 (5 years ago)
Author:
stoecker
Message:

fix #13040 - patch by Michael Zangl - gsoc-core - fix exception

File:
1 edited

Legend:

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

    r10454 r10478  
    8585        JPopupMenu menu = super.buildPopupMenu();
    8686        zoomToGap = new ZoomToGapAction();
    87         Main.getLayerManager().addLayerChangeListener(zoomToGap);
    88         Main.getLayerManager().addActiveLayerChangeListener(zoomToGap);
     87        registerListeners();
    8988        getSelectionModel().addListSelectionListener(zoomToGap);
    9089        menu.add(zoomToGap);
     
    139138
    140139    @Override
     140    public void registerListeners() {
     141        Main.getLayerManager().addLayerChangeListener(zoomToGap);
     142        Main.getLayerManager().addActiveLayerChangeListener(zoomToGap);
     143        super.registerListeners();
     144    }
     145
     146    @Override
    141147    public void unregisterListeners() {
    142148        super.unregisterListeners();
Note: See TracChangeset for help on using the changeset viewer.