Skip to content

Commit 0d4e3bf

Browse files
authored
Merge pull request #115 from FalsinSoft/Branch_v4.0.0
Fix custom labels draw
2 parents 24bebf1 + 194a3b0 commit 0d4e3bf

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lib/jkqtplotter/jkqtpcoordinateaxes.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,13 +1012,9 @@ bool JKQTPCoordinateAxis::getNextLabel(double& x, QString& label, bool init) {
10121012
} else {
10131013
for (int i=0; i<tickLabels.size(); i++) {
10141014
if (x==tickLabels[i].first && i+1<tickLabels.size()) {
1015-
if (x>=axismin && x<=axismax) {
1016-
label=tickLabels[i+1].second;
1017-
x=tickLabels[i+1].first;
1018-
return true;
1019-
} else {
1020-
return false;
1021-
}
1015+
x=tickLabels[i + 1].first;
1016+
label=tickLabels[i + 1].second;
1017+
return (x<=axismax);
10221018
}
10231019
}
10241020
}

0 commit comments

Comments
 (0)