Ticket #24507: 24507.patch
| File 24507.patch, 2.2 KB (added by , 5 weeks ago) |
|---|
-
src/org/openstreetmap/josm/actions/corrector/TagCorrector.java
13 13 import java.util.Map; 14 14 import java.util.Map.Entry; 15 15 import java.util.Set; 16 import java.util.stream.Collectors; 16 17 17 18 import javax.swing.JLabel; 18 19 import javax.swing.JPanel; … … 31 32 import org.openstreetmap.josm.gui.correction.RoleCorrectionTable; 32 33 import org.openstreetmap.josm.gui.correction.TagCorrectionTable; 33 34 import org.openstreetmap.josm.gui.widgets.JMultilineLabel; 35 import org.openstreetmap.josm.tools.AlphanumComparator; 34 36 import org.openstreetmap.josm.tools.GBC; 35 37 import org.openstreetmap.josm.tools.ImageProvider; 36 38 import org.openstreetmap.josm.tools.UserCancelException; … … 94 96 p.add(label2, GBC.eop().anchor(GBC.CENTER).fill(GBC.HORIZONTAL)); 95 97 96 98 for (Entry<OsmPrimitive, List<TagCorrection>> entry : tagCorrectionsMap.entrySet()) { 99 if (entry.getValue().isEmpty()) 100 continue; 101 97 102 final OsmPrimitive primitive = entry.getKey(); 98 final List<TagCorrection> tagCorrections = entry.getValue(); 103 final List<TagCorrection> tagCorrections = entry.getValue().stream() 104 .sorted((o1, o2) -> AlphanumComparator.getInstance().compare(o1.oldKey, o2.oldKey)) 105 .collect(Collectors.toList()); 99 106 100 if (tagCorrections.isEmpty()) {101 continue;102 }103 104 107 final JLabel propertiesLabel = new JLabel(tr("Tags of ")); 105 108 p.add(propertiesLabel, GBC.std()); 106 109 … … 111 114 ); 112 115 p.add(primitiveLabel, GBC.eol()); 113 116 114 final TagCorrectionTable table = new TagCorrectionTable( 115 tagCorrections); 117 final TagCorrectionTable table = new TagCorrectionTable(tagCorrections); 116 118 final JScrollPane scrollPane = new JScrollPane(table); 117 119 p.add(scrollPane, GBC.eop().fill(GBC.BOTH)); 118 120
