Changeset 9192 in josm for trunk/src/org


Ignore:
Timestamp:
2015-12-28T12:09:19+01:00 (9 years ago)
Author:
simon04
Message:

fix #12091 - Merging of nodes show conflict in case that one node is part of a relation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java

    r8871 r9192  
    199199     */
    200200    public void prepareDefaultRelationDecisions() {
     201
     202        if (Utils.forAll(primitives, OsmPrimitive.nodePredicate)) {
     203            final Collection<OsmPrimitive> primitivesInDecisions = new HashSet<>();
     204            for (final RelationMemberConflictDecision i : decisions) {
     205                primitivesInDecisions.add(i.getOriginalPrimitive());
     206            }
     207            if (primitivesInDecisions.size() == 1) {
     208                for (final RelationMemberConflictDecision i : decisions) {
     209                    i.decide(RelationMemberConflictDecisionType.KEEP);
     210                }
     211                refresh();
     212                return;
     213            }
     214        }
    201215
    202216        for (final Relation relation : relations) {
Note: See TracChangeset for help on using the changeset viewer.