[Kst] branches/work/kst/portto4/kst/src/libkstapp
Peter Kümmel
syntheticpp at gmx.net
Tue Jan 15 21:45:31 UTC 2013
SVN commit 1332954 by kuemmel:
don't hang in endless loop
M +4 -1 plotaxis.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/plotaxis.cpp #1332953:1332954
@@ -866,8 +866,11 @@
//TODO Why could range_u be 0? Then it hangs in while(1)
if (range_u != 0)
tickspacing = tickspacing_u * range/range_u;
+ else
+ tickspacing = range;
+
if (_axisForceOffsetMin) {
base_jd = min_jd;
}
@@ -908,7 +911,7 @@
double nextMinorTick = firstMinorTick;
while (1) {
nextMinorTick = firstMinorTick + (i_minor++ * minorTickSpacing);
- if (nextMinorTick > max)
+ if (nextMinorTick > max || isnan(nextMinorTick))
break;
if (!ticks.contains(nextMinorTick) && (nextMinorTick > min)) {
minTicks << nextMinorTick;
More information about the Kst
mailing list