diff --git a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp index 3ae8ea92a8..b8b122b9af 100644 --- a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp +++ b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp @@ -1012,13 +1012,9 @@ bool JKQTPCoordinateAxis::getNextLabel(double& x, QString& label, bool init) { } else { for (int i=0; i=axismin && x<=axismax) { - label=tickLabels[i+1].second; - x=tickLabels[i+1].first; - return true; - } else { - return false; - } + x=tickLabels[i + 1].first; + label=tickLabels[i + 1].second; + return (x<=axismax); } } }