Ticket #23482: 23482-3.patch

File 23482-3.patch, 1.8 KB (added by GerdP, 22 months ago)

avoid misaligned tables

  • src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

     
    293293        }
    294294
    295295        final Changeset oppCs = model != null ? model.getPointInTime(pointInTimeType.opposite()).getChangeset() : null;
    296         updateText(cs, "comment", texChangesetComment, null, oppCs, texChangesetComment);
    297         updateText(cs, "source", texChangesetSource, lblSource, oppCs, pnlChangesetSource);
    298         updateText(cs, "imagery_used", texChangesetImageryUsed, lblImageryUsed, oppCs, pnlChangesetImageryUsed);
     296        updateText(cs, "comment", texChangesetComment, oppCs, texChangesetComment);
     297        updateText(cs, "source", texChangesetSource, oppCs, pnlChangesetSource);
     298        updateText(cs, "imagery_used", texChangesetImageryUsed, oppCs, pnlChangesetImageryUsed);
    299299    }
    300300
    301301    private static String insertWbr(String s) {
     
    302302        return Utils.escapeReservedCharactersHTML(s).replace("_", "_<wbr>");
    303303    }
    304304
    305     protected static void updateText(Changeset cs, String attr, JTextArea textArea, JLabel label, Changeset oppCs, JComponent container) {
     305    protected static void updateText(Changeset cs, String attr, JTextArea textArea, Changeset oppCs, JComponent container) {
    306306        final String text = cs != null ? cs.get(attr) : null;
    307307        // Update text, hide prefixing label if empty
    308         if (label != null) {
    309             label.setVisible(text != null && !Utils.isStripEmpty(text));
    310         }
    311308        textArea.setText(text);
    312309        // Hide container if values of both versions are empty
    313310        container.setVisible(text != null || (oppCs != null && oppCs.get(attr) != null));