Changeset 9867 in josm


Ignore:
Timestamp:
2016-02-24T00:09:28+01:00 (6 years ago)
Author:
Don-vip
Message:

see #11968, fix #12550 - in relation editor, node features are shown without name (only icon, regression from r8903)

Location:
trunk/src/org/openstreetmap/josm/gui/dialogs/relation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableMemberCellRenderer.java

    r9705 r9867  
    2525    protected void renderPrimitive(OsmPrimitive primitive, Dimension cellSize) {
    2626        // Make icon the full height of the table cell. Icon background is square.
    27         setIcon(ImageProvider.getPadded(primitive, cellSize));
     27        int size = Math.min(cellSize.width, cellSize.height);
     28        setIcon(ImageProvider.getPadded(primitive, new Dimension(size, size)));
    2829        setText(primitive.getDisplayName(DefaultNameFormatter.getInstance()));
    2930        setToolTipText(DefaultNameFormatter.getInstance().buildDefaultToolTip(primitive));
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableCellRenderer.java

    r9705 r9867  
    6161
    6262    protected void renderPrimitive(OsmPrimitive primitive, Dimension cellSize) {
    63         setIcon(ImageProvider.getPadded(primitive, cellSize));
     63        int size = Math.min(cellSize.width, cellSize.height);
     64        setIcon(ImageProvider.getPadded(primitive, new Dimension(size, size)));
    6465        setText(primitive.getDisplayName(DefaultNameFormatter.getInstance()));
    6566        setToolTipText(DefaultNameFormatter.getInstance().buildDefaultToolTip(primitive));
Note: See TracChangeset for help on using the changeset viewer.