gui/new_map_win.cc
changeset 1597 15b51d278bf0
parent 1593 a8a007f1c01c
child 1737 dc821d2668c1
     1.1 --- a/gui/new_map_win.cc	Wed Jul 27 11:19:35 2005 +0000
     1.2 +++ b/gui/new_map_win.cc	Wed Jul 27 11:35:13 2005 +0000
     1.3 @@ -89,17 +89,21 @@
     1.4  
     1.5    if((point_num<=1)&&(valid_double)&&(!mapname.empty()))
     1.6      {
     1.7 +      int abortion=0;
     1.8        if(edge.get_active())
     1.9  	{
    1.10 -	  gdc.addNewEdgeMap(def_val,mapname);
    1.11 +	  abortion=gdc.addNewEdgeMap(def_val,mapname);
    1.12  	}
    1.13        else
    1.14  	{
    1.15 -	  gdc.addNewNodeMap(def_val,mapname);
    1.16 +	  abortion=gdc.addNewNodeMap(def_val,mapname);
    1.17  	}
    1.18 -      name.set_text("");
    1.19 -      default_value.set_text("0");
    1.20 -      hide();
    1.21 +      if(!abortion)
    1.22 +	{
    1.23 +	  name.set_text("");
    1.24 +	  default_value.set_text("0");
    1.25 +	  hide();
    1.26 +	}
    1.27      }
    1.28  }
    1.29