QCustomPlot Discussion and Comments

QCPTextElement::setTextFlags does nothing since mTextFlags isn't used in the draw functionReturn to overview

This setter is great, but the mTextFlags attribute is never used.

void QCPTextElement::setTextFlags(int flags)
{
  mTextFlags = flags;
}

void QCPTextElement::draw(QCPPainter *painter)
{
  painter->setFont(mainFont());
  painter->setPen(QPen(mainTextColor()));
  painter->drawText(mRect, Qt::AlignCenter, mText, &mTextBoundingRect);
}

Fix:

void QCPTextElement::draw(QCPPainter *painter)
{
  painter->setFont(mainFont());
  painter->setPen(QPen(mainTextColor()));
  painter->drawText(mRect, mTextFlags, mText, &mTextBoundingRect);
}

Hi Freaksken,
thanks for the feedback! This bug is known and fixed in the upcoming release.