Ignore:
Timestamp:
2024-06-07T09:51:18+02:00 (5 months ago)
Author:
GerdP
Message:

fix #23715: Plugin Relation Toolbox began to remove multipuligons

  • don't change member list to empty list if relation is not valid
  • add/improve unit tests
  • fix project files to allow running unit tests in Eclipse
File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/MultipolygonFixer.java

    r36217 r36280  
    5050    public Command fixRelation(Relation rel) {
    5151        List<RelationMember> members = fixMultipolygonRoles(rel.getMembers());
    52         if (!members.equals(rel.getMembers())) {
    53             final DataSet ds = Utils.firstNonNull(rel.getDataSet(), MainApplication.getLayerManager().getEditDataSet());
    54             return new ChangeMembersCommand(ds, rel, members);
    55         }
    56         return null;
     52        if (members.isEmpty() || members.equals(rel.getMembers()))
     53            return null;
     54        final DataSet ds = Utils.firstNonNull(rel.getDataSet(), MainApplication.getLayerManager().getEditDataSet());
     55        return new ChangeMembersCommand(ds, rel, members);
    5756    }
    5857
Note: See TracChangeset for help on using the changeset viewer.