浏览代码

d.legend: fix https://trac.osgeo.org/grass/ticket/3106

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@69036 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 9 年之前
父节点
当前提交
8e2cfacf21
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      display/d.legend/draw.c

+ 4 - 2
display/d.legend/draw.c

@@ -1343,8 +1343,10 @@ void draw(const char *map_name, int maptype, int color, int thin, int lines,
                 y0bg = y0 - txsiz;
                 y0bg = y0 - txsiz;
 
 
 
 
-            D_use_color(colorbg);
-            D_box_abs(x0bg, y0bg, x1bg, y1bg);
+            if (colorbg != 0) {
+                D_use_color(colorbg);
+                D_box_abs(x0bg, y0bg, x1bg, y1bg);
+            }
 
 
             D_use_color(colorb);
             D_use_color(colorb);
             D_begin();
             D_begin();