Changeset 1970 in josm for trunk


Ignore:
Timestamp:
2009-08-12T15:46:05+02:00 (15 years ago)
Author:
Gubaer
Message:

fixed #3252: selected primitives after deleting a data layer

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

Legend:

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

    r1951 r1970  
    2727import java.util.HashSet;
    2828import java.util.LinkedList;
     29import java.util.List;
    2930import java.util.Map;
    3031import java.util.TreeMap;
     
    816817            OsmDataLayer dataLayer = (OsmDataLayer)newLayer;
    817818            selectionChanged(dataLayer.data.getSelected());
     819        } else {
     820            List<OsmPrimitive> selection = Collections.emptyList();
     821            selectionChanged(selection);
    818822        }
    819823    }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r1814 r1970  
    1616import java.awt.event.MouseEvent;
    1717import java.util.Collection;
     18import java.util.Collections;
    1819import java.util.LinkedList;
     20import java.util.List;
    1921import java.util.NoSuchElementException;
    2022
     
    377379            OsmDataLayer dataLayer = (OsmDataLayer)newLayer;
    378380            selectionChanged(dataLayer.data.getSelected());
    379 
    380         }
    381 
     381        } else {
     382            List<OsmPrimitive> selection = Collections.emptyList();
     383            selectionChanged(selection);
     384        }
    382385    }
    383386
    384387    public void layerAdded(Layer newLayer) {
    385388        // do nothing
    386 
    387389    }
    388390
    389391    public void layerRemoved(Layer oldLayer) {
    390392        // do nothing
    391 
    392393    }
    393394}
Note: See TracChangeset for help on using the changeset viewer.