Changeset 18516 in josm


Ignore:
Timestamp:
2022-07-13T22:00:49+02:00 (2 years ago)
Author:
taylor.smock
Message:

Move OsmPrimitive isDrawable to AbstractPrimitive

This should have no effect on binary compatibility (according to
japi-compliance-checker), and allows filters to work properly on
non-OsmPrimitive objects (like vector primitives).

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
2 edited

Legend:

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

    r18473 r18516  
    457457    public void setHiddenType(boolean isExplicit) {
    458458        updateFlags(FLAG_HIDDEN_TYPE, isExplicit);
     459    }
     460
     461    @Override
     462    public boolean isDrawable() {
     463        return (flags & (FLAG_DELETED + FLAG_INCOMPLETE + FLAG_HIDE_IF_DISABLED)) == 0;
    459464    }
    460465
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r17862 r18516  
    386386
    387387    @Override
    388     public boolean isDrawable() {
    389         return (flags & (FLAG_DELETED + FLAG_INCOMPLETE + FLAG_HIDE_IF_DISABLED)) == 0;
    390     }
    391 
    392     @Override
    393388    public void setModified(boolean modified) {
    394389        checkDatasetNotReadOnly();
Note: See TracChangeset for help on using the changeset viewer.