Changeset 5299 in josm


Ignore:
Timestamp:
Jun 24, 2012 9:15:57 PM (11 months ago)
Author:
Don-vip
Message:

conflict dialog: better display of empty rows in members tab, like previous work on nodes tab, plus fix Junit test

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java

    r5296 r5299  
    9393        setBackground(ConflictColors.BGCOLOR.get()); 
    9494        setForeground(ConflictColors.FGCOLOR.get()); 
     95        setBorder(null); 
     96        setIcon(null); 
    9597        setToolTipText(null); 
    9698    } 
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java

    r5266 r5299  
    153153        RelationMember member = (RelationMember)value; 
    154154        reset(); 
    155         if (value == null) 
    156             return this; 
    157  
    158         renderBackground(getModel(table), member, row, column, isSelected); 
    159         renderForeground(getModel(table), member, row, column, isSelected); 
    160         switch(column) { 
    161         case 0: 
    162             renderRowId(row); 
    163             break; 
    164         case 1: 
    165             if (member == null) { 
    166                 renderEmptyRow(); 
    167             } else { 
     155        if (member == null) { 
     156            renderEmptyRow(); 
     157        } else { 
     158            renderBackground(getModel(table), member, row, column, isSelected); 
     159            renderForeground(getModel(table), member, row, column, isSelected); 
     160            switch(column) { 
     161            case 0: 
     162                renderRowId(row); 
     163                break; 
     164            case 1: 
    168165                renderRole(member); 
     166                break; 
     167            case 2: 
     168                renderPrimitive(member); 
     169                break; 
     170            default: 
     171                // should not happen 
    169172            } 
    170             break; 
    171         case 2: 
    172             if (member == null) { 
    173                 renderEmptyRow(); 
    174             } else { 
    175                 renderPrimitive(member); 
    176             } 
    177             break; 
    178         default: 
    179             // should not happen 
    180173        } 
    181174        return this; 
  • trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModelTest.java

    r3577 r5299  
    8484        Way theirWay = their.addWay(1); 
    8585 
    86         model.populate(myWay, theirWay); 
     86        model.populate(myWay, theirWay, null); 
    8787        model.copyMyToTop(new int[]{0}); 
    8888 
     
    108108        Way theirWay = their.addWay(1); 
    109109 
    110         model.populate(myWay, theirWay); 
     110        model.populate(myWay, theirWay, null); 
    111111 
    112112        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
     
    135135 
    136136 
    137         model.populate(myWay, theirWay); 
     137        model.populate(myWay, theirWay, null); 
    138138 
    139139        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
     
    161161        Way theirWay = their.addWay(1); 
    162162 
    163         model.populate(myWay, theirWay); 
     163        model.populate(myWay, theirWay, null); 
    164164 
    165165        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
     
    188188        Way theirWay = their.addWay(1); 
    189189 
    190         model.populate(myWay, theirWay); 
     190        model.populate(myWay, theirWay, null); 
    191191        model.copyMyToEnd(new int[]{0}); 
    192192 
     
    209209        Way theirWay = their.addWay(1); 
    210210 
    211         model.populate(myWay, theirWay); 
     211        model.populate(myWay, theirWay, null); 
    212212 
    213213        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
     
    235235        Way theirWay = their.addWay(1); 
    236236 
    237         model.populate(myWay, theirWay); 
     237        model.populate(myWay, theirWay, null); 
    238238 
    239239        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
     
    263263        Way theirWay = their.addWay(1); 
    264264 
    265         model.populate(myWay, theirWay); 
     265        model.populate(myWay, theirWay, null); 
    266266 
    267267        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
     
    294294        Way theirWay = their.addWay(1); 
    295295 
    296         model.populate(myWay, theirWay); 
     296        model.populate(myWay, theirWay, null); 
    297297        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
    298298        mergedNodes.add(new Node(10)); 
     
    322322        Way theirWay = their.addWay(1); 
    323323 
    324         model.populate(myWay, theirWay); 
     324        model.populate(myWay, theirWay, null); 
    325325        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
    326326        mergedNodes.add(new Node(10)); 
     
    350350        Way theirWay = their.addWay(1); 
    351351 
    352         model.populate(myWay, theirWay); 
     352        model.populate(myWay, theirWay, null); 
    353353        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
    354354        mergedNodes.add(new Node(10)); 
     
    383383        Way theirWay = their.addWay(1); 
    384384 
    385         model.populate(myWay, theirWay); 
     385        model.populate(myWay, theirWay, null); 
    386386        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
    387387        mergedNodes.add(new Node(10)); 
     
    412412        Way theirWay = their.addWay(1); 
    413413 
    414         model.populate(myWay, theirWay); 
     414        model.populate(myWay, theirWay, null); 
    415415        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
    416416        mergedNodes.add(new Node(10)); 
     
    442442        Way theirWay = their.addWay(1); 
    443443 
    444         model.populate(myWay, theirWay); 
     444        model.populate(myWay, theirWay, null); 
    445445        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
    446446        mergedNodes.add(new Node(10)); 
     
    474474        Way theirWay = new Way(1); 
    475475 
    476         model.populate(myWay, theirWay); 
     476        model.populate(myWay, theirWay, null); 
    477477        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
    478478        mergedNodes.add(new Node(10)); 
     
    500500        Way theirWay = new Way(1); 
    501501 
    502         model.populate(myWay, theirWay); 
     502        model.populate(myWay, theirWay, null); 
    503503        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
    504504        mergedNodes.add(new Node(10)); 
     
    530530        Way theirWay = new Way(1); 
    531531 
    532         model.populate(myWay, theirWay); 
     532        model.populate(myWay, theirWay, null); 
    533533        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
    534534        mergedNodes.add(new Node(10)); 
     
    563563        Way theirWay = new Way(1); 
    564564 
    565         model.populate(myWay, theirWay); 
     565        model.populate(myWay, theirWay, null); 
    566566        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
    567567        mergedNodes.add(new Node(10)); 
     
    589589        Way theirWay = new Way(1); 
    590590 
    591         model.populate(myWay, theirWay); 
     591        model.populate(myWay, theirWay, null); 
    592592        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
    593593        mergedNodes.add(new Node(10)); 
     
    619619        Way theirWay = new Way(1); 
    620620 
    621         model.populate(myWay, theirWay); 
     621        model.populate(myWay, theirWay, null); 
    622622        List<Node> mergedNodes = inspectNodeList(model, "Merged"); 
    623623        mergedNodes.add(new Node(10)); 
Note: See TracChangeset for help on using the changeset viewer.