diff src/java/de/intevation/mxd/writer/LineStyleWriter.java @ 184:c79c3c6fc99a

Always save a symbol set, use the mapfile name as prefix for the symbol set and use the mapfile path to save the symbol set.
author raimund renkert <raimund.renkert@intevation.de>
date Wed, 20 Jul 2011 12:23:57 +0200
parents 0bde090506f9
children df4e0946ef02
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/writer/LineStyleWriter.java	Mon Jul 18 17:17:04 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/LineStyleWriter.java	Wed Jul 20 12:23:57 2011 +0200
@@ -129,14 +129,7 @@
             }
         }
 
-        String type = symbolElement.getAttribute("type");
-        if(type.equals("marker")) {
-            SymbolWriter sw = new SymbolWriter(this.map, this.cl);
-            sw.write(symbolElement);
-            String name = symbolElement.getAttribute("name");
-            style.setSymbolByName(map, name);
-            symbolObj sym = symbolSet.getSymbolByName(name);
-        }
+
 
         //The following lines are for dashed and/or dotted lines.
         if(symbolElement.hasAttribute("linestyle")) {
@@ -202,6 +195,24 @@
                 logger.warn("Could not write PATTERN.");
             }
         }
+        String type = symbolElement.getAttribute("type");
+        if(type.equals("marker")) {
+            SymbolWriter sw = new SymbolWriter(this.map, this.cl);
+            sw.write(symbolElement);
+            String name = symbolElement.getAttribute("name");
+            style.setSymbolByName(map, name);
+            symbolObj sym = symbolSet.getSymbolByName(name);
+        }
+        else {
+            try {
+                SymbolWriter sw = new SymbolWriter (this.map, this.cl);
+                sw.saveSymbolSet (symbolSet);
+            }
+            catch (Exception e) {
+                logger.warn("Could not write symbol set.");
+            }
+        }
+
         return false;
     }
 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)