浏览代码

+fixme comment, don't need to set the region here, two clearer messages instead of one blurry one for PERMANENT window changes

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@49797 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 13 年之前
父节点
当前提交
f6ae245b72
共有 1 个文件被更改,包括 6 次插入7 次删除
  1. 6 7
      raster/r.in.gdal/main.c

+ 6 - 7
raster/r.in.gdal/main.c

@@ -611,9 +611,11 @@ int main(int argc, char *argv[])
     /* -------------------------------------------------------------------- */
     if (flag_e->answer) {
 	if (strcmp(G_mapset(), "PERMANENT") == 0)
+	    /* fixme: expand WIND and DEFAULT_WIND independently. (currently
+		WIND gets forgotten and DEFAULT_WIND is expanded for both) */
 	    G_get_default_window(&cur_wind);
 	else
-	    G_get_set_window(&cur_wind);
+	    G_get_window(&cur_wind);
 
 	cur_wind.north = MAX(cur_wind.north, cellhd.north);
 	cur_wind.south = MIN(cur_wind.south, cellhd.south);
@@ -630,13 +632,10 @@ int main(int argc, char *argv[])
 
 	if (strcmp(G_mapset(), "PERMANENT") == 0) {
 	    G__put_window(&cur_wind, "", "DEFAULT_WIND");
-	    G_put_window(&cur_wind);
-	    G_message(_("Default and working regions for this location updated"));
-	}
-	else {
-	    G_put_window(&cur_wind);
-	    G_message(_("Region for the current mapset updated"));
+	    G_message(_("Default region for this location updated"));
 	}
+	G_put_window(&cur_wind);
+	G_message(_("Region for the current mapset updated"));
     }
 
     exit(EXIT_SUCCESS);