Changeset 14152 in josm for trunk/src/org
- Timestamp:
- 2018-08-12T21:38:40+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/preferences/ColorInfo.java
r12987 r14152 4 4 import java.awt.Color; 5 5 import java.util.List; 6 6 7 import org.openstreetmap.josm.tools.ColorHelper; 7 8 … … 149 150 } 150 151 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 } 151 159 } -
trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
r14149 r14152 236 236 .sorted((e1, e2) -> { 237 237 int cat = Integer.compare( 238 getCateg royPriority(e1.info.getCategory()),239 getCateg royPriority(e2.info.getCategory()));238 getCategoryPriority(e1.info.getCategory()), 239 getCategoryPriority(e2.info.getCategory())); 240 240 if (cat != 0) return cat; 241 241 return Collator.getInstance().compare(e1.getDisplay(), e2.getDisplay()); … … 246 246 this.colors.repaint(); 247 247 } 248 249 } 250 251 private static int getCategroyPriority(String category) { 248 } 249 250 private static int getCategoryPriority(String category) { 252 251 switch (category) { 253 252 case NamedColorProperty.COLOR_CATEGORY_GENERAL: return 1; … … 409 408 if (e.info.getValue() != null) { 410 409 if (e.toProperty().put(e.info.getValue()) 411 && e.key.startsWith("mappaint.")) {410 && NamedColorProperty.COLOR_CATEGORY_MAPPAINT.equals(e.info.getCategory())) { 412 411 ret = true; 413 412 }
Note:
See TracChangeset
for help on using the changeset viewer.