[GRASS-SVN] r46988 - in grass/trunk/display: d.rast d.vect

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 5 06:23:37 EDT 2011


Author: martinl
Date: 2011-07-05 03:23:37 -0700 (Tue, 05 Jul 2011)
New Revision: 46988

Modified:
   grass/trunk/display/d.rast/main.c
   grass/trunk/display/d.vect/main.c
Log:
d.rast/d.vect: call D_save_command()


Modified: grass/trunk/display/d.rast/main.c
===================================================================
--- grass/trunk/display/d.rast/main.c	2011-07-05 10:21:14 UTC (rev 46987)
+++ grass/trunk/display/d.rast/main.c	2011-07-05 10:23:37 UTC (rev 46988)
@@ -9,13 +9,14 @@
  *               Eric G. Miller <egm2 jps.net>, 
  *               Glynn Clements <glynn gclements.plus.com>, 
  *               Jan-Oliver Wagner <jan intevation.de>, 
- *               Radim Blazek <radim.blazek gmail.com>
+ *               Radim Blazek <radim.blazek gmail.com>,
+ *               Martin Landa <landa.martin gmail.com>
  * PURPOSE:      display raster maps in active graphics display
- * COPYRIGHT:    (C) 1999-2006 by the GRASS Development Team
+ * COPYRIGHT:    (C) 1999-2006, 2011 by the GRASS Development Team
  *
- *               This program is free software under the GNU General Public
- *               License (>=v2). Read the file COPYING that comes with GRASS
- *               for details.
+ *               This program is free software under the GNU General
+ *               Public License (>=v2). Read the file COPYING that
+ *               comes with GRASS for details.
  *
  *****************************************************************************/
 #include <stdlib.h>
@@ -92,7 +93,8 @@
     invert = flag_i->answer;
 
     if (D_open_driver() != 0)
-	G_fatal_error(_("No graphics device selected"));
+	G_fatal_error(_("No graphics device selected. "
+			"Use d.mon to select graphics device."));
 
     fp = Rast_map_is_fp(name, "");
     if (vallist->answer) {
@@ -108,9 +110,10 @@
 	display(name, overlay, bg->answer, DCELL_TYPE, invert);
     else
 	display(name, overlay, bg->answer, CELL_TYPE, invert);
-
+    
+    D_save_command(G_recreate_command());
     D_close_driver();
-
+    
     exit(EXIT_SUCCESS);
 }
 

Modified: grass/trunk/display/d.vect/main.c
===================================================================
--- grass/trunk/display/d.vect/main.c	2011-07-05 10:21:14 UTC (rev 46987)
+++ grass/trunk/display/d.vect/main.c	2011-07-05 10:23:37 UTC (rev 46988)
@@ -4,11 +4,11 @@
  * MODULE:       d.vect
  * AUTHOR(S):    CERL, Radim Blazek, others
  * PURPOSE:      Display the vector map in map display
- * COPYRIGHT:    (C) 2004-2009 by the GRASS Development Team
+ * COPYRIGHT:    (C) 2004-2009, 2011 by the GRASS Development Team
  *
- *               This program is free software under the GNU General Public
- *               License (>=v2). Read the file COPYING that comes with GRASS
- *               for details.
+ *               This program is free software under the GNU General
+ *               Public License (>=v2). Read the file COPYING that
+ *               comes with GRASS for details.
  *
  *****************************************************************************/
 
@@ -377,8 +377,9 @@
     G_get_set_window(&window);
 
     if (D_open_driver() != 0)
-	G_fatal_error(_("No graphics device selected"));
-
+	G_fatal_error(_("No graphics device selected. "
+			"Use d.mon to select graphics device."));
+    
     /* Read map options */
 
     /* Check min/max region */
@@ -704,6 +705,7 @@
 	}
     }
 
+    D_save_command(G_recreate_command());
     D_close_driver();
 
     G_done_msg(" ");



More information about the grass-commit mailing list