Changeset 9710 in josm for trunk/src/org


Ignore:
Timestamp:
2016-02-01T21:57:56+01:00 (9 years ago)
Author:
simon04
Message:

see #5546 - Relation editor: fix sorting when copying/pasting relation members

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/CopyMembersAction.java

    r9665 r9710  
    33
    44import java.awt.event.ActionEvent;
    5 import java.util.HashSet;
    6 import java.util.Set;
     5import java.util.Collection;
    76
    87import org.openstreetmap.josm.actions.CopyAction;
    98import org.openstreetmap.josm.data.osm.OsmPrimitive;
    10 import org.openstreetmap.josm.data.osm.RelationMember;
     9import org.openstreetmap.josm.gui.dialogs.relation.IRelationEditor;
    1110import org.openstreetmap.josm.gui.dialogs.relation.MemberTableModel;
    12 import org.openstreetmap.josm.gui.dialogs.relation.IRelationEditor;
    1311import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1412
     
    3129    @Override
    3230    public void actionPerformed(ActionEvent e) {
    33         Set<OsmPrimitive> primitives = new HashSet<>();
    34         for (RelationMember rm: memberTableModel.getSelectedMembers()) {
    35             primitives.add(rm.getMember());
    36         }
     31        final Collection<OsmPrimitive> primitives = memberTableModel.getSelectedChildPrimitives();
    3732        if (!primitives.isEmpty()) {
    3833            CopyAction.copy(layer, primitives);
Note: See TracChangeset for help on using the changeset viewer.