瀏覽代碼

d.mon: fix starting wx-monitors

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@64442 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 年之前
父節點
當前提交
9fe8693fb6
共有 1 個文件被更改,包括 7 次插入5 次删除
  1. 7 5
      display/d.mon/start.c

+ 7 - 5
display/d.mon/start.c

@@ -73,8 +73,7 @@ char *start(const char *name, const char *output, int update)
 }
 
 /* start wxGUI display monitor */
-char *start_wx(const char *name, const char *element,
-               int width, int height, int x_only)
+char *start_wx(const char *name, const char *element, int width, int height, int x_only)
 {
     char progname[GPATH_MAX];
     char str_width[1024], str_height[1024], *str_x_only;
@@ -191,10 +190,13 @@ int start_mon(const char *name, const char *output, int select,
     close(fd);
 
     /* start monitor */
-    if (strncmp(name, "wx", 2) == 0) 
-        out_file = start_wx(name, mon_path, width, height, x_only);
-    else
+    if (strncmp(name, "wx", 2) == 0) {
+        G_file_name(file_path, mon_path, NULL, G_mapset());
+        out_file = start_wx(name, file_path, width, height, x_only);
+    }
+    else {
         out_file = start(name, output, update);
+    }
     
     /* create env file (environmental variables used for rendering) */
     G_debug(1, "Monitor name=%s, envfile=%s", name, env_file);