瀏覽代碼

applied patch proposed by Patrice Dumas on grass-dev



git-svn-id: https://svn.osgeo.org/grass/grass/trunk@50582 15284696-431f-4ddb-bdfa-cd5b030d7da7
Moritz Lennert 13 年之前
父節點
當前提交
1eabe7e37a
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      scripts/d.vect.thematic/d.vect.thematic.py

+ 4 - 2
scripts/d.vect.thematic/d.vect.thematic.py

@@ -426,6 +426,9 @@ end
         "custom_gradient":	(startcolor,	endcolor)
         }
 
+    # open file for psmap instructions
+    f_psmap = file(tmp_psmap, 'w')
+
     # graduated color thematic mapping
     if themetype == "graduated_colors":
         if colorscheme in colorschemes:
@@ -728,7 +731,6 @@ end
                               where = sqlwhere,
                               color = linecolor, fcolor = themecolor, icon = icon, size = ptsize)
 
-            f_psmap = file(tmp_psmap, 'w')
             if type in ["line", "boundary"]:
                 out(f_psmap, locals(), """\
 vlines $map
@@ -914,7 +916,7 @@ end
                 lineht = 4
 
             if i < xlower or i >= xupper:
-                if themetype == graduated_lines:
+                if themetype == "graduated_lines":
                     out(f_graph, locals(), """\
 color $linecolor
 """)