Changeset 4566 in josm


Ignore:
Timestamp:
Nov 2, 2011 2:39:27 PM (19 months ago)
Author:
stoecker
Message:

fix #6652 - patch by olejorgenb - Members list in history panel for relations and ways is broken

Location:
trunk/src/org/openstreetmap/josm/gui/history
Files:
3 edited

Legend:

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

    r4498 r4566  
    596596        @Override 
    597597        public int getRowCount() { 
     598            // Match the size of the opposite table so comparison is less confusing. 
     599            // (scroll bars lines up properly, etc.) 
    598600            int n = 0; 
    599601            if (current != null && current.getType().equals(OsmPrimitiveType.RELATION)) { 
     
    644646            if (relation == null) 
    645647                return null; 
    646             if (row >= relation.getNumMembers()) 
     648            if (row >= relation.getNumMembers()) // see getRowCount 
    647649                return null; 
    648650            return relation.getMembers().get(row); 
  • trunk/src/org/openstreetmap/josm/gui/history/NodeListTableCellRenderer.java

    r4498 r4566  
    6262    } 
    6363 
     64    // Warning: The model pads with null-rows to match the size of the opposite table. 'value' could be null 
    6465    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, 
    6566            int row, int column) { 
    66         if (value == null) 
    67             return this; 
    6867 
    6968        renderNode((TwoColumnDiff.Item)value, isSelected); 
  • trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListTableCellRenderer.java

    r4072 r4566  
    9292    } 
    9393 
     94    // Warning: The model pads with null-rows to match the size of the opposite table. 'value' could be null 
    9495    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, 
    9596            int row, int column) { 
    96         if (value == null) 
    97             return this; 
    9897 
    9998        HistoryBrowserModel.RelationMemberTableModel model = gteRelationMemberTableModel(table); 
Note: See TracChangeset for help on using the changeset viewer.