Ignore:
Timestamp:
2010-02-14T13:07:03+01:00 (10 years ago)
Author:
Gubaer
Message:

fixed #4386: "There are unsolved conflicts in layer X" holds up any uploading from the layer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/conflict/Conflict.java

    r2881 r2979  
    33
    44import org.openstreetmap.josm.data.osm.OsmPrimitive;
     5import org.openstreetmap.josm.data.osm.PrimitiveId;
    56
    67/**
     
    4243    }
    4344
     45    /**
     46     * Replies true if the primitive <code>primitive</code> is participating
     47     * in this conflict
     48     *
     49     * @param primitive the primitive
     50     * @return true if the primitive <code>primitive</code> is participating
     51     * in this conflict
     52     */
     53    public boolean isParticipating(OsmPrimitive primitive) {
     54        if (primitive == null) return false;
     55        return primitive.getPrimitiveId().equals(my.getPrimitiveId())
     56        || primitive.getPrimitiveId().equals(their.getPrimitiveId());
     57    }
     58
     59    /**
     60     * Replies true if the primitive with id <code>id</code> is participating
     61     * in this conflict
     62     *
     63     * @param id the primitive id
     64     * @return true if the primitive <code>primitive</code> is participating
     65     * in this conflict
     66     */
     67    public boolean isParticipating(PrimitiveId id) {
     68        if (id == null) return false;
     69        return id.equals(my.getPrimitiveId())
     70        || id.equals(their.getPrimitiveId());
     71    }
     72
    4473    @Override
    4574    public int hashCode() {
Note: See TracChangeset for help on using the changeset viewer.