graph_displayer_canvas-event.cc
branchgui
changeset 45 199f433eb7cd
parent 43 9fe6eebde1a8
child 46 121452cc4096
     1.1 --- a/graph_displayer_canvas-event.cc	Wed Jul 27 11:02:51 2005 +0000
     1.2 +++ b/graph_displayer_canvas-event.cc	Wed Jul 27 11:19:35 2005 +0000
     1.3 @@ -751,21 +751,25 @@
     1.4  		      }
     1.5  		    mapvalue_ch[i]=mapvalue_str[i];
     1.6  		  }
     1.7 -  
     1.8 -		double mapvalue_d=atof(mapvalue_ch);
     1.9 -
    1.10 +  	      
    1.11  		//if the text in the entry was correct
    1.12  		if((point_num<=1)&&(valid_double))
    1.13  		  {
    1.14 +		    double mapvalue_d=atof(mapvalue_ch);
    1.15 +
    1.16 +		    //reconvert the double to string for the correct format
    1.17 +		    std::ostringstream ostr;
    1.18 +		    ostr << mapvalue_d;
    1.19 +
    1.20  		    //save the value to the correct place
    1.21  		    switch(actual_tool)
    1.22  		      {
    1.23  		      case EDGE_MAP_EDIT:
    1.24 -			edgetextmap[active_edge]->property_text().set_value(mapvalue_str);
    1.25 +			edgetextmap[active_edge]->property_text().set_value(ostr.str());
    1.26  			(*(mapstorage.edgemap_storage)[edgemap_to_edit])[active_edge]=mapvalue_d;
    1.27  			break;
    1.28  		      case NODE_MAP_EDIT:
    1.29 -			nodetextmap[active_node]->property_text().set_value(mapvalue_str);
    1.30 +			nodetextmap[active_node]->property_text().set_value(ostr.str());
    1.31  			(*(mapstorage.nodemap_storage)[nodemap_to_edit])[active_node]=mapvalue_d;
    1.32  			break;
    1.33  		      default: