Use linesP and vec_linesP names

This commit is contained in:
Ondřej Čertík 2019-11-28 20:33:53 -07:00
parent ae722e8c33
commit 65c23c9669

View File

@ -94,8 +94,8 @@ void JKQTPXYLineGraph::draw(JKQTPEnhancedPainter& painter) {
//double yold=-1;
//bool first=false;
//QVector<QLineF> lines;
std::vector<QPolygonF> linesP;
linesP.push_back(QPolygonF());
std::vector<QPolygonF> vec_linesP;
vec_linesP.push_back(QPolygonF());
intSortData();
for (int iii=imin; iii<imax; iii++) {
int i=qBound(imin, getDataIndex(iii), imax);
@ -112,25 +112,25 @@ void JKQTPXYLineGraph::draw(JKQTPEnhancedPainter& painter) {
if ((!parent->getXAxis()->isLogAxis() || xv>0.0) && (!parent->getYAxis()->isLogAxis() || yv>0.0) ) {
plotStyledSymbol(parent, painter, x, y);
if (drawLine) {
linesP[linesP.size()-1] << QPointF(x,y);
vec_linesP[vec_linesP.size()-1] << QPointF(x,y);
}
} else {
linesP.push_back(QPolygonF());
vec_linesP.push_back(QPolygonF());
}
}
}
//qDebug()<<"JKQTPXYLineGraph::draw(): "<<4<<" lines="<<lines.size();
//qDebug()<<"JKQTPXYLineGraph::draw(): "<<5<<" p="<<painter.pen();
for (auto &lines : linesP) {
if (lines.size()>0) {
for (auto &linesP : vec_linesP) {
if (linesP.size()>0) {
if (isHighlighted()) {
painter.setPen(penSelection);
//painter.drawLines(lines);
painter.drawPolyline(lines);
painter.drawPolyline(linesP);
}
painter.setPen(p);
//painter.drawLines(lines);
painter.drawPolyline(lines);
painter.drawPolyline(linesP);
}
}
//qDebug()<<"JKQTPXYLineGraph::draw(): "<<6;