Merge pull request #115 from FalsinSoft/Branch_v4.0.0

Fix custom labels draw
This commit is contained in:
Jan W. Krieger 2024-01-06 15:21:16 +01:00 committed by GitHub
commit 0d4e3bff7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1012,13 +1012,9 @@ bool JKQTPCoordinateAxis::getNextLabel(double& x, QString& label, bool init) {
} else { } else {
for (int i=0; i<tickLabels.size(); i++) { for (int i=0; i<tickLabels.size(); i++) {
if (x==tickLabels[i].first && i+1<tickLabels.size()) { if (x==tickLabels[i].first && i+1<tickLabels.size()) {
if (x>=axismin && x<=axismax) { x=tickLabels[i + 1].first;
label=tickLabels[i+1].second; label=tickLabels[i + 1].second;
x=tickLabels[i+1].first; return (x<=axismax);
return true;
} else {
return false;
}
} }
} }
} }