From: Pablo d'A. <da...@us...> - 2006-02-05 20:00:51
|
Update of /cvsroot/hugin/hugin/src/hugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28603/src/hugin Modified Files: Plot2D.cpp Log Message: fixed enless loop if x or y range = 0 Index: Plot2D.cpp =================================================================== RCS file: /cvsroot/hugin/hugin/src/hugin/Plot2D.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Plot2D.cpp 5 Feb 2006 14:07:09 -0000 1.1 +++ Plot2D.cpp 5 Feb 2006 20:00:40 -0000 1.2 @@ -230,7 +230,7 @@ s = AxisRound(s / pow(10.0,e)) * pow(10.0,e); int i = utils::roundi(x_min / s); // used to paint nice numbers - while(i*s < x_max + 1e-10){ + while(i*s < x_max + 1e-10 && s > 1e-5){ // draw x axis divisions wxPoint divPoint = ToScreen(FDiff2D(i*s, x_axis_y), scale); dc.SetPen(m_axisPen); @@ -263,7 +263,7 @@ e = floor(log10(s)); s = AxisRound(s / pow(10.0,e)) * pow(10.0,e); i = utils::roundi(y_min / s); - while(i*s < y_max + 1e-10){ + while(i*s < y_max + 1e-10 && s > 1e-5){ // draw y axis divisions wxPoint divPoint = ToScreen(FDiff2D(y_axis_x,i*s), scale); dc.SetPen(m_axisPen); |