diff --git a/doc/dox/whatsnew.dox b/doc/dox/whatsnew.dox
index c48a29b271..7bcb2fe753 100644
--- a/doc/dox/whatsnew.dox
+++ b/doc/dox/whatsnew.dox
@@ -14,6 +14,7 @@ This page lists release notes for the diferent version of JKQTPlotter
\subsection page_whatsnew_TRUNK_OVERVIEW trunk: Overview
Changes, compared to \ref page_whatsnew_V4_0_0 "v4.0.0" include:
diff --git a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp
index 3ae8ea92a8..f2fd5985f2 100644
--- a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp
+++ b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp
@@ -1011,14 +1011,10 @@ bool JKQTPCoordinateAxis::getNextLabel(double& x, QString& label, bool init) {
return (tickLabels.size()>0);
} else {
for (int i=0; i=axismin && x<=axismax) {
- label=tickLabels[i+1].second;
- x=tickLabels[i+1].first;
- return true;
- } else {
- return false;
- }
+ if (fabs(x-tickLabels[i].first)<1e-30 && i+1=axismin && x<=axismax);
}
}
}