Changeset 5451 in josm for trunk


Ignore:
Timestamp:
2012-08-18T18:18:04+02:00 (12 years ago)
Author:
Don-vip
Message:

fix #7978 - Merging nodes and upload were broken due to improper combobox initialization

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionRenderer.java

    r5429 r5451  
    55import java.awt.Font;
    66
    7 import javax.swing.DefaultComboBoxModel;
    87import javax.swing.JLabel;
    98import javax.swing.JList;
     
    3433
    3534    public RelationMemberConflictDecisionRenderer() {
    36         DefaultComboBoxModel model = new DefaultComboBoxModel();
    37         cbDecisionTypes = new JosmComboBox(model);
    38         model.addElement(RelationMemberConflictDecisionType.KEEP);
    39         model.addElement(RelationMemberConflictDecisionType.REMOVE);
    40         model.addElement(RelationMemberConflictDecisionType.UNDECIDED);
     35        cbDecisionTypes = new JosmComboBox(RelationMemberConflictDecisionType.values());
    4136        cbDecisionTypes.setRenderer(this);
    4237    }
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java

    r5450 r5451  
    7070    public JosmComboBox(ComboBoxModel aModel) {
    7171        super(aModel);
    72         init(aModel != null && aModel.getSize() > 0 ? aModel.getElementAt(0) : DEFAULT_PROTOTYPE_DISPLAY_VALUE);
     72        init(aModel != null && aModel.getSize() > 0 ? aModel.getElementAt(0) : null);
    7373    }
    7474
     
    8383    public JosmComboBox(Object[] items) {
    8484        super(items);
    85         init(items != null && items.length > 0 ? items[0] : DEFAULT_PROTOTYPE_DISPLAY_VALUE);
     85        init(items != null && items.length > 0 ? items[0] : null);
    8686    }
    8787
     
    9696    public JosmComboBox(Vector<?> items) {
    9797        super(items);
    98         init(items != null && !items.isEmpty() ? items.get(0) : DEFAULT_PROTOTYPE_DISPLAY_VALUE);
     98        init(items != null && !items.isEmpty() ? items.get(0) : null);
    9999    }
    100100   
Note: See TracChangeset for help on using the changeset viewer.