[PATCH] (issue1753) Fix editing the point color (not Color) of SQThemes

Wald Commits scm-commit at wald.intevation.org
Fri Mar 20 15:04:28 CET 2015


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1426860265 -3600
# Node ID d23982357c793cb4bbb8bb0dc76bc519aeed430b
# Parent  8641ce84a4b3525715ca0b152002a77627b110e0
(issue1753) Fix editing the point color (not Color) of SQThemes.

    Theme handling was already done case insensitive for some things
    but not for all. This is better as it makes the theme
    documents more robust and there is no ambiguity in the
    supported keywords.

diff -r 8641ce84a4b3 -r d23982357c79 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/StyleEditorWindow.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/StyleEditorWindow.java	Fri Mar 20 14:31:14 2015 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/StyleEditorWindow.java	Fri Mar 20 15:04:25 2015 +0100
@@ -350,8 +350,8 @@
 
             DynamicForm property = createPropertyUI(
                 set.getDisplayName(),
-                set.getName(),
-                set.getType(),
+                set.getName().toLowerCase(),
+                set.getType().toLowerCase(),
                 set.getDefaultValue());
             if (property != null) {
                 vl.addMember(property);
@@ -477,7 +477,7 @@
                 f = c;
             }
         }
-        else if (type.equals("Color")) {
+        else if (type.equals("color")) {
             ColorPickerItem c = new ColorPickerItem(name, MSG.getString(name));
             c.setValue(rgbToHtml(value));
             f = c;
@@ -504,7 +504,7 @@
             });
             f.setValue(value);
         }
-        else if (type.equals("Dash")) {
+        else if (type.equals("dash")) {
             f = new SelectItem(name, MSG.getString(name));
             LinkedHashMap<String, String> valueIcons = new LinkedHashMap<String, String>();
             f.setImageURLPrefix(GWT.getHostPageBaseURL() + "images/linestyle-dash-");
@@ -526,7 +526,7 @@
             f.setValueMap(valueMap);
             f.setValue(value);
         }
-        else if (type.equals("Font")) {
+        else if (type.equals("font")) {
             f = new SelectItem(name, MSG.getString(name));
             LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>();
             valueMap.put("arial", "<span style='font-family:arial'>Arial</span>");
@@ -536,7 +536,7 @@
             f.setValueMap(valueMap);
             f.setValue(value);
         }
-        else if (type.equals("Style")) {
+        else if (type.equals("style")) {
             f = new SelectItem(name, MSG.getString(name));
             LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>();
             valueMap.put("standard", "<span style='font-style:normal'>Normal</span>");
@@ -545,7 +545,7 @@
             f.setValueMap(valueMap);
             f.setValue(value);
         }
-        else if (type.equals("Symbol")) {
+        else if (type.equals("symbol")) {
             //create an empty element as long as this property can not be
             //changed.
             f = new StaticTextItem("");


More information about the Dive4Elements-commits mailing list