mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-11-15 10:05:47 +08:00
Merge pull request #115 from FalsinSoft/Branch_v4.0.0
Fix custom labels draw
This commit is contained in:
commit
0d4e3bff7d
@ -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) {
|
|
||||||
label=tickLabels[i+1].second;
|
|
||||||
x=tickLabels[i + 1].first;
|
x=tickLabels[i + 1].first;
|
||||||
return true;
|
label=tickLabels[i + 1].second;
|
||||||
} else {
|
return (x<=axismax);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user