Index: graph_displayer_canvas-edge.cc
===================================================================
--- graph_displayer_canvas-edge.cc	(revision 44)
+++ graph_displayer_canvas-edge.cc	(revision 45)
@@ -120,35 +120,8 @@
 	      edgemap_to_edit=mapname;
 	      double number=(*(mapstorage.edgemap_storage)[mapname])[i];
-// 	      int length=1;
-// 	      //if number is smaller than one, length would be negative, or invalid
-// 	      if(number>=1)
-// 		{
-// 		  length=(int)(floor(log(number)/log(10)))+1;
-// 		}
-// 	      int maxpos=(int)(pow(10,length-1));
-// 	      int strl=length+1+RANGE;
-// 	      char * str=new char[strl];
-// 	      str[length]='.';
-// 	      str[strl]='\0';
-      
-// 	      for(int j=0;j<strl;j++)
-// 		{
-// 		  if(j!=length)
-// 		    {
-// 		      if((number-(int)number)>ALMOST_ONE)
-// 			{
-// 			  number=round(number);
-// 			}
-// 		      int digit=(int)(number/maxpos);
-// 		      str[j]=(digit+'0');
-// 		      number-=digit*maxpos;
-// 		      number*=10;
-// 		    }
-// 		}
-//       	      edgetextmap[i]->property_text().set_value(str);
 
 	      std::ostringstream ostr;
 	      ostr << number;
-
+	      
       	      edgetextmap[i]->property_text().set_value(ostr.str());
 	    }
@@ -166,32 +139,9 @@
 	{
 	  double number=(*(mapstorage.edgemap_storage)[mapname])[edge];
-	  int length=1;
-	  //if number is smaller than one, length would be negative, or invalid
-	  if(number>=1)
-	    {
-	      length=(int)(floor(log(number)/log(10)))+1;
-	    }
-	  int maxpos=(int)(pow(10,length-1));
-	  int strl=length+1+RANGE;
-	  char * str=new char[strl];
-	  str[length]='.';
-	  str[strl]='\0';
-      
-	  for(int j=0;j<strl;j++)
-	    {
-	      if(j!=length)
-		{
-		  if((number-(int)number)>ALMOST_ONE)
-		    {
-		      number=round(number);
-		    }
-		  int digit=(int)(number/maxpos);
-		  str[j]=(digit+'0');
-		  number-=digit*maxpos;
-		  number*=10;
-		}
-	    }
-      
-	  edgetextmap[edge]->property_text().set_value(str);
+
+	  std::ostringstream ostr;
+	  ostr << number;
+	  
+	  edgetextmap[edge]->property_text().set_value(ostr.str());
 	}
       else
Index: graph_displayer_canvas-event.cc
===================================================================
--- graph_displayer_canvas-event.cc	(revision 43)
+++ graph_displayer_canvas-event.cc	(revision 45)
@@ -752,19 +752,23 @@
 		    mapvalue_ch[i]=mapvalue_str[i];
 		  }
-  
-		double mapvalue_d=atof(mapvalue_ch);
-
+  	      
 		//if the text in the entry was correct
 		if((point_num<=1)&&(valid_double))
 		  {
+		    double mapvalue_d=atof(mapvalue_ch);
+
+		    //reconvert the double to string for the correct format
+		    std::ostringstream ostr;
+		    ostr << mapvalue_d;
+
 		    //save the value to the correct place
 		    switch(actual_tool)
 		      {
 		      case EDGE_MAP_EDIT:
-			edgetextmap[active_edge]->property_text().set_value(mapvalue_str);
+			edgetextmap[active_edge]->property_text().set_value(ostr.str());
 			(*(mapstorage.edgemap_storage)[edgemap_to_edit])[active_edge]=mapvalue_d;
 			break;
 		      case NODE_MAP_EDIT:
-			nodetextmap[active_node]->property_text().set_value(mapvalue_str);
+			nodetextmap[active_node]->property_text().set_value(ostr.str());
 			(*(mapstorage.nodemap_storage)[nodemap_to_edit])[active_node]=mapvalue_d;
 			break;
Index: graph_displayer_canvas-node.cc
===================================================================
--- graph_displayer_canvas-node.cc	(revision 36)
+++ graph_displayer_canvas-node.cc	(revision 45)
@@ -150,35 +150,9 @@
 	      nodemap_to_edit=mapname;
 	      double number=(*actual_map)[i];
-	      int length=1;
-	      //if number is smaller than one, length would be negative, or invalid
-	      if(number>=1)
-		{
-		  length=(int)(floor(log(number)/log(10)))+1;
-		}
-	      int maxpos=(int)(pow(10,length-1));
-	      int strl=length+1+RANGE;
-	      char * str=new char[strl];
-	      str[length]='.';
-	      str[strl]='\0';
-      
-	      for(int j=0;j<strl;j++)
-		{
-		  if(j!=length)
-		    {
-//  		      std::cout << (number) << "-" << (int)number << "=" << (number)-(int)number << std::endl;
-		      if((number-(int)number)>ALMOST_ONE)
-			{
-// 			  std::cout<<"rounding: " <<number<<std::endl;
-			  number=round(number);
-			}
- 		      int digit=(int)(number/maxpos);
-// 		      std::cout << number << "/" << maxpos << "=" << digit << std::endl;
-		      str[j]=(digit+'0');
-		      number-=digit*maxpos;
-		      number*=10;
-		    }
-		}
-      
-	      nodetextmap[i]->property_text().set_value(str);
+
+	      std::ostringstream ostr;
+	      ostr << number;
+	      
+      	      nodetextmap[i]->property_text().set_value(ostr.str());
 	    }
 	  else
@@ -194,32 +168,9 @@
 	{
 	  double number=(*actual_map)[node];
-	  int length=1;
-	  //if number is smaller than one, length would be negative, or invalid
-	  if(number>=1)
-	    {
-	      length=(int)(floor(log(number)/log(10)))+1;
-	    }
-	  int maxpos=(int)(pow(10,length-1));
-	  int strl=length+1+RANGE;
-	  char * str=new char[strl];
-	  str[length]='.';
-	  str[strl]='\0';
-      
-	  for(int j=0;j<strl;j++)
-	    {
-	      if(j!=length)
-		{
-		  if((number-(int)number)>ALMOST_ONE)
-		    {
-		      number=round(number);
-		    }
-		  int digit=(int)(number/maxpos);
-		  str[j]=(digit+'0');
-		  number-=digit*maxpos;
-		  number*=10;
-		}
-	    }
-      
-	  nodetextmap[node]->property_text().set_value(str);
+
+	  std::ostringstream ostr;
+	  ostr << number;
+	      
+	  nodetextmap[node]->property_text().set_value(ostr.str());
 	}
       else
