mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-25 01:51:49 +08:00
bugfixed QSet-initialization
This commit is contained in:
parent
848ec1952a
commit
fc642b6cac
@ -131,5 +131,6 @@ If we set seondary axes for the x-axis instead of the y-axis, i.e. use
|
||||
// ...
|
||||
```
|
||||
we get a plot like this:
|
||||
|
||||
![second_axis_hor](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/second_axis_hor.png)
|
||||
|
||||
|
@ -3337,14 +3337,20 @@ bool JKQTBasePlotter::hasYAxis(JKQTPCoordinateAxisRef axis) const
|
||||
|
||||
QSet<JKQTPCoordinateAxisRef> JKQTBasePlotter::getAvailableXAxisRefs(bool includePrimary) const
|
||||
{
|
||||
QSet<JKQTPCoordinateAxisRef> res(secondaryXAxis.keyBegin(),secondaryXAxis.keyEnd());
|
||||
QSet<JKQTPCoordinateAxisRef> res;
|
||||
for (auto it=secondaryXAxis.begin(); it!=secondaryXAxis.end(); ++it) {
|
||||
res.insert(it.key());
|
||||
}
|
||||
if (includePrimary) res.insert(JKQTPPrimaryAxis);
|
||||
return res;
|
||||
}
|
||||
|
||||
QSet<JKQTPCoordinateAxisRef> JKQTBasePlotter::getAvailableYAxisRefs(bool includePrimary) const
|
||||
{
|
||||
QSet<JKQTPCoordinateAxisRef> res(secondaryYAxis.keyBegin(),secondaryYAxis.keyEnd());
|
||||
QSet<JKQTPCoordinateAxisRef> res;
|
||||
for (auto it=secondaryYAxis.begin(); it!=secondaryYAxis.end(); ++it) {
|
||||
res.insert(it.key());
|
||||
}
|
||||
if (includePrimary) res.insert(JKQTPPrimaryAxis);
|
||||
return res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user