# HG changeset patch # User hegyi # Date 1122030267 0 # Node ID 7a8c41aa3c299241fd0391b603220e9adc4c76e2 # Parent 79bffdf6aea275dd41a10125036e6f871fc41de3 There were bugs, created yesterday, and there is still one. (I hope only one :) ) diff -r 79bffdf6aea2 -r 7a8c41aa3c29 all_include.h --- a/all_include.h Thu Jul 21 19:28:29 2005 +0000 +++ b/all_include.h Fri Jul 22 11:04:27 2005 +0000 @@ -22,7 +22,7 @@ #define RANGE 3 #define WIN_WIDTH 900 #define WIN_HEIGHT 600 - +#define ALMOST_ONE 0.99999999999999 #ifndef MAIN_PART extern std::vector edge_property_strings; diff -r 79bffdf6aea2 -r 7a8c41aa3c29 graph_displayer_canvas-edge.cc --- a/graph_displayer_canvas-edge.cc Thu Jul 21 19:28:29 2005 +0000 +++ b/graph_displayer_canvas-edge.cc Fri Jul 22 11:04:27 2005 +0000 @@ -136,6 +136,10 @@ { if(j!=length) { + if((number-(int)number)>ALMOST_ONE) + { + number=round(number); + } int digit=(int)(number/maxpos); str[j]=(digit+'0'); number-=digit*maxpos; @@ -174,6 +178,10 @@ { if(j!=length) { + if((number-(int)number)>ALMOST_ONE) + { + number=round(number); + } int digit=(int)(number/maxpos); str[j]=(digit+'0'); number-=digit*maxpos; diff -r 79bffdf6aea2 -r 7a8c41aa3c29 graph_displayer_canvas-node.cc --- a/graph_displayer_canvas-node.cc Thu Jul 21 19:28:29 2005 +0000 +++ b/graph_displayer_canvas-node.cc Fri Jul 22 11:04:27 2005 +0000 @@ -135,7 +135,7 @@ //in that case empty string will be written, because //that is the deleter map - Graph::NodeMap * actual_map; + Graph::NodeMap * actual_map=NULL; if(mapname!="Default") { actual_map=(mapstorage.nodemap_storage)[mapname]; @@ -165,7 +165,14 @@ { if(j!=length) { - int digit=(int)round(number/maxpos); +// std::cout << (number) << "-" << (int)number << "=" << (number)-(int)number << std::endl; + if((number-(int)number)>ALMOST_ONE) + { +// std::cout<<"rounding: " <