[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdeedu/kalzium/src
From:       Pino Toscano <toscano.pino () tiscali ! it>
Date:       2005-12-30 22:02:32
Message-ID: 1135980152.613467.19654.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 492725 by pino:

Fix Y padding in Plot Viewer so it's possible to plot single points.


 M  +4 -0      elementdataviewer.cpp  


--- branches/KDE/3.5/kdeedu/kalzium/src/elementdataviewer.cpp #492724:492725
@@ -121,6 +121,10 @@
 	// try to put a small padding to make the points on the axis visible
 	double dx = ( t - f + 1 ) / 25 + 1.0;
 	double dy = ( maxY - minY ) / 10.0;
+	// in case that dy is quite small (for example, when plotting a single
+	// point)
+	if ( dy < 1e-7 )
+		dy = maxY / 10.0;
 	m_pPlotWidget->setLimits( f - dx, t + dx, minY - dy, maxY + dy );
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic