Changeset 35621 in osm for applications/editors


Ignore:
Timestamp:
2020-10-26T09:32:10+01:00 (4 years ago)
Author:
simon04
Message:

EditLevel0LAction: updateEnabledState

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/comfort0/src/net/simon04/comfort0/EditLevel0LAction.java

    r35620 r35621  
    1111import java.nio.file.Path;
    1212import java.util.ArrayList;
     13import java.util.Collection;
    1314import java.util.Collections;
    1415import java.util.List;
     
    4647                "theta",
    4748                tr("Edit the selected objects in an external editor in the Level0L format"),
    48                 null, false);
     49                null, false, "EditLevel0LAction", true);
    4950    }
    5051
     
    5657            Logging.error(ex);
    5758        }
     59    }
     60
     61    @Override
     62    protected void updateEnabledState() {
     63        updateEnabledStateOnCurrentSelection(true);
     64    }
     65
     66    @Override
     67    protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
     68        setEnabled(selection != null && !selection.isEmpty());
    5869    }
    5970
Note: See TracChangeset for help on using the changeset viewer.