Edwin Leuven wrote:
we could check for default values instead at the beginning of setQPainterPen, but this seems a bit fragile
this seems to work fine (since we call this one only after creating a painter):
void QLPainter::setQPainterPen(QPainter & qp, LColor_color col, Painter::line_style ls, Painter::line_width lw) { if (col == LColor::black && ls == line_solid && lw == line_thin) return; QPen pen = qp.pen(); if (col != LColor::black) pen.setColor(lcolorcache.get(col)); if (ls == line_onoffdash) pen.setStyle(Qt::DotLine); if (lw == line_thick) pen.setWidth(3); qp.setPen(pen); }