[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kst/portto4/kst/src/libkstapp
From: Peter Kümmel <syntheticpp () gmx ! net>
Date: 2013-01-15 21:45:31
Message-ID: 20130115214531.684C3AC86A () svn ! kde ! org
[Download RAW message or body]
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;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic