Changeset 16204 in josm


Ignore:
Timestamp:
2020-03-27T10:51:26+01:00 (5 years ago)
Author:
GerdP
Message:

fix #18979: Improve display of PrimitiveIds
Show e.g. "w2, r123456789" instead of "way 2, relation 123456789" so that output matches the expected input format for object downloads

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java

    r16203 r16204  
    204204     * @return The Dialog object
    205205     */
    206     private static ExtendedDialog reportProblemDialog(Set<PrimitiveId> errs,
     206    public static ExtendedDialog reportProblemDialog(Set<PrimitiveId> errs,
    207207            String title, String text, String listLabel, int msgType) {
    208208        JPanel p = new JPanel(new GridBagLayout());
     
    220220        txt.setColumns(40);
    221221        txt.setRows(1);
    222         txt.setText(errs.stream().map(String::valueOf).collect(Collectors.joining(", ")));
     222        txt.setText(errs.stream().map(pid -> pid.getType().getAPIName().substring(0, 1) + pid.getUniqueId())
     223                .collect(Collectors.joining(", ")));
    223224        JScrollPane scroll = new JScrollPane(txt);
    224225        p.add(scroll, GBC.eop().weight(1.0, 0.0).fill(GBC.HORIZONTAL));
Note: See TracChangeset for help on using the changeset viewer.