Ignore:
Timestamp:
2017-11-25T14:14:25+01:00 (15 months ago)
Author:
Don-vip
Message:

fix #13153 - Should not warn to upload/save "modified" layers with 0 objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/DataSet.java

    r12970 r13161  
    2525
    2626import org.openstreetmap.josm.Main;
     27import org.openstreetmap.josm.data.APIDataSet.APIOperation;
    2728import org.openstreetmap.josm.data.Bounds;
    2829import org.openstreetmap.josm.data.Data;
     
    11361137
    11371138    /**
     1139     * Replies true if there is at least one primitive in this dataset which requires to be uploaded to server.
     1140     * @return true if there is at least one primitive in this dataset which requires to be uploaded to server
     1141     * @since 13161
     1142     */
     1143    public boolean requiresUploadToServer() {
     1144        for (OsmPrimitive p: allPrimitives) {
     1145            if (APIOperation.of(p) != null)
     1146                return true;
     1147        }
     1148        return false;
     1149    }
     1150
     1151    /**
    11381152     * Adds a new data set listener.
    11391153     * @param dsl The data set listener to add
Note: See TracChangeset for help on using the changeset viewer.