Changeset 14152 in josm for trunk


Ignore:
Timestamp:
2018-08-12T21:38:40+02:00 (6 years ago)
Author:
Don-vip
Message:

see #15410, see #16604 - restore restart notification when mappaint colors are modified in preferences

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/preferences/ColorInfo.java

    r12987 r14152  
    44import java.awt.Color;
    55import java.util.List;
     6
    67import org.openstreetmap.josm.tools.ColorHelper;
    78
     
    149150    }
    150151
     152    @Override
     153    public String toString() {
     154        return "ColorInfo [" + (category != null ? "category=" + category + ", " : "")
     155                + (source != null ? "source=" + source + ", " : "") + (name != null ? "name=" + name + ", " : "")
     156                + (value != null ? "value=" + value + ", " : "")
     157                + (defaultValue != null ? "defaultValue=" + defaultValue : "") + "]";
     158    }
    151159}
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java

    r14149 r14152  
    236236                .sorted((e1, e2) -> {
    237237                    int cat = Integer.compare(
    238                             getCategroyPriority(e1.info.getCategory()),
    239                             getCategroyPriority(e2.info.getCategory()));
     238                            getCategoryPriority(e1.info.getCategory()),
     239                            getCategoryPriority(e2.info.getCategory()));
    240240                    if (cat != 0) return cat;
    241241                    return Collator.getInstance().compare(e1.getDisplay(), e2.getDisplay());
     
    246246            this.colors.repaint();
    247247        }
    248 
    249     }
    250 
    251     private static int getCategroyPriority(String category) {
     248    }
     249
     250    private static int getCategoryPriority(String category) {
    252251        switch (category) {
    253252            case NamedColorProperty.COLOR_CATEGORY_GENERAL: return 1;
     
    409408            if (e.info.getValue() != null) {
    410409                if (e.toProperty().put(e.info.getValue())
    411                         && e.key.startsWith("mappaint.")) {
     410                        && NamedColorProperty.COLOR_CATEGORY_MAPPAINT.equals(e.info.getCategory())) {
    412411                    ret = true;
    413412                }
Note: See TracChangeset for help on using the changeset viewer.