Ticket #23023: fix-color-buttons.patch
File fix-color-buttons.patch, 938 bytes (added by , 20 months ago) |
---|
-
src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
441 441 442 442 private void updateEnabledState() { 443 443 int sel = colors.getSelectedRow(); 444 if (sel < 0 || sel >= colors.getRowCount()) { 445 return; 444 ColorEntry ce; 445 if (sel >= 0 && sel < colors.getRowCount()) { 446 ce = (ColorEntry) colors.getValueAt(sel, 0); 447 } else { 448 ce = null; 446 449 } 447 ColorEntry ce = (ColorEntry) colors.getValueAt(sel, 0);448 450 remove.setEnabled(ce != null && isRemoveColor(ce)); 449 451 colorEdit.setEnabled(ce != null); 450 452 defaultSet.setEnabled(ce != null && !ce.isDefault());