Ticket #13250: member_sort_performance.patch

File member_sort_performance.patch, 1.1 KB (added by GerdP, 4 years ago)
  • core/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java

     
    66import java.awt.Dimension;
    77import java.awt.GraphicsEnvironment;
    88import java.awt.event.ActionEvent;
    9 import java.util.ArrayList;
    109import java.util.Arrays;
    1110import java.util.Collection;
    12 import java.util.List;
     11import java.util.HashSet;
    1312
    1413import javax.swing.AbstractAction;
    1514import javax.swing.DropMode;
     
    109108    private transient ListSelectionListener highlighterListener = lse -> {
    110109        if (Main.isDisplayingMapView()) {
    111110            Collection<RelationMember> sel = getMemberTableModel().getSelectedMembers();
    112             final List<OsmPrimitive> toHighlight = new ArrayList<>();
     111            final HashSet<OsmPrimitive> toHighlight = new HashSet<>();
    113112            for (RelationMember r: sel) {
    114113                if (r.getMember().isUsable()) {
    115114                    toHighlight.add(r.getMember());