Changeset 19020 in josm for trunk


Ignore:
Timestamp:
2024-03-23T07:32:28+01:00 (8 months ago)
Author:
GerdP
Message:

see #23482: optimize the space in the history view (column width) and consider adding line wrapping

  • avoid misaligned tables caused by invisible fields (in many but not all cases)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r17838 r19020  
    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
     
    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;
    307         // Update text, hide prefixing label if empty
    308         if (label != null) {
    309             label.setVisible(text != null && !Utils.isStripEmpty(text));
    310         }
    311307        textArea.setText(text);
    312308        // Hide container if values of both versions are empty
Note: See TracChangeset for help on using the changeset viewer.