diff -r 0bd9e53c8b28 -r 3bde58e2d5ca gui/graph_displayer_canvas-edge.cc --- a/gui/graph_displayer_canvas-edge.cc Wed Jul 27 10:47:38 2005 +0000 +++ b/gui/graph_displayer_canvas-edge.cc Wed Jul 27 11:02:51 2005 +0000 @@ -119,34 +119,38 @@ { 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'; +// 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;jALMOST_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); +// for(int j=0;jALMOST_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()); } else {