Changeset 14835 in josm for trunk/src/org
- Timestamp:
- 2019-03-05T15:04:58+01:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ValidateAction.java
r14666 r14835 12 12 import java.util.Optional; 13 13 14 import org.openstreetmap.josm.data.osm.DataSet; 14 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 16 import org.openstreetmap.josm.data.preferences.sources.ValidatorPrefHelper; … … 95 96 @Override 96 97 public void updateEnabledState() { 97 setEnabled(getLayerManager().getActiveDataSet() != null); 98 DataSet ds = getLayerManager().getActiveDataSet() ; 99 setEnabled(ds != null && !ds.isEmpty()); 98 100 } 99 101 -
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r14556 r14835 1201 1201 this.remark = remark; 1202 1202 } 1203 1204 /** 1205 * @return true if this Dataset contains no primitives 1206 * @since 14835 1207 */ 1208 public boolean isEmpty() { 1209 return allPrimitives.isEmpty(); 1210 } 1203 1211 }
Note:
See TracChangeset
for help on using the changeset viewer.