Ignore:
Timestamp:
2018-02-18T05:02:23+01:00 (12 months ago)
Author:
Don-vip
Message:

see #8039, see #10456 - support read-only data layers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java

    r13189 r13434  
    2828import org.openstreetmap.josm.data.coor.EastNorth;
    2929import org.openstreetmap.josm.data.coor.LatLon;
     30import org.openstreetmap.josm.data.osm.DataSet;
    3031import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    3132import org.openstreetmap.josm.data.osm.Node;
     
    364365    @Override
    365366    protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
    366         if (selection == null || selection.isEmpty()) {
     367        if (selection == null || selection.isEmpty()
     368                || selection.stream().map(OsmPrimitive::getDataSet).anyMatch(DataSet::isReadOnly)) {
    367369            setEnabled(false);
    368370            return;
Note: See TracChangeset for help on using the changeset viewer.