Changeset 5036 in josm for trunk/src/org


Ignore:
Timestamp:
2012-03-03T20:03:21+01:00 (12 years ago)
Author:
akks
Message:

Fix exceptions when using selection history (skip nonselectable/deteted primitives) - see #6640

File:
1 edited

Legend:

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

    r4982 r5036  
    765765            int relations = 0;
    766766            for (OsmPrimitive o : sel) {
     767                if (! o.isSelectable()) continue; // skip unselectable primitives
    767768                if (o instanceof Way) {
    768769                    ways++;
     
    786787                .append(trn("{0} relation", "{0} relations", relations, relations));
    787788            }
     789            if(ways + nodes + relations == 0) {
     790                text.append(tr("Unselectable now"));
     791                this.sel=new ArrayList<OsmPrimitive>(); // empty selection
     792            }           
    788793            if(ways + nodes + relations == 1)
    789794            {
Note: See TracChangeset for help on using the changeset viewer.