Changeset 1897 in josm for trunk/src/org


Ignore:
Timestamp:
2009-08-03T20:25:05+02:00 (15 years ago)
Author:
jttt
Message:

Fix #3085

File:
1 edited

Legend:

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

    r1895 r1897  
    127127
    128128    public void updateList() {
     129        if (Main.main.getCurrentDataSet() == null) {
     130            list.setSize(0);
     131            return;
     132        }
    129133        Relation selected = getSelected();
    130134        list.setSize(getNumRelations());
     
    147151
    148152    public void activeLayerChange(Layer a, Layer b) {
    149         if ((a == null || a instanceof OsmDataLayer) && b instanceof OsmDataLayer) {
    150             if (a != null) {
    151                 ((OsmDataLayer)a).listenerDataChanged.remove(this);
    152             }
    153             ((OsmDataLayer)b).listenerDataChanged.add(this);
    154             updateList();
    155             repaint();
    156         }
     153        updateList();
    157154    }
    158155
     
    171168    public void dataChanged(OsmDataLayer l) {
    172169        updateList();
    173         repaint();
    174170    }
    175171
     
    213209    /**
    214210     * Selects the relation <code>relation</code> in the list of relations.
    215      * 
     211     *
    216212     * @param relation  the relation
    217213     */
Note: See TracChangeset for help on using the changeset viewer.