diff --git a/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java b/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java index 9c1f2e3248d..f1096190e7e 100644 --- a/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java +++ b/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java @@ -110,17 +110,14 @@ private static class ColorEntry { * @return a description of the color */ public String getDisplay() { - switch (info.getCategory()) { - case NamedColorProperty.COLOR_CATEGORY_MAPPAINT: - if (info.getSource() != null) - return tr("Paint style {0}: {1}", tr(I18n.escape(info.getSource())), tr(info.getName())); - // fall through - default: - if (info.getSource() != null) - return tr(I18n.escape(info.getSource())) + " - " + tr(I18n.escape(info.getName())); - else - return tr(I18n.escape(info.getName())); + if (info.getSource() != null) { + if (info.getCategory() == NamedColorProperty.COLOR_CATEGORY_MAPPAINT) + return tr("Paint style {0}: {1}", tr(I18n.escape(info.getSource())), tr(info.getName())); + else + return tr(I18n.escape(info.getSource())) + " - " + tr(I18n.escape(info.getName())); } + else + return tr(I18n.escape(info.getName())); } /**