Browse Source

PFD: Avoid copy constructor

QGC4.4
Lorenz Meier 10 years ago
parent
commit
a62f9f8c60
  1. 2
      src/ui/PrimaryFlightDisplay.cc

2
src/ui/PrimaryFlightDisplay.cc

@ -453,7 +453,7 @@ void PrimaryFlightDisplay::drawTextCenterBottom ( @@ -453,7 +453,7 @@ void PrimaryFlightDisplay::drawTextCenterBottom (
font.setPixelSize(pixelSize);
painter.setFont(font);
QFontMetrics metrics = QFontMetrics(font);
QFontMetrics metrics(font);
QRect bounds = metrics.boundingRect(text);
int flags = Qt::AlignCenter;
painter.drawText(x - bounds.width()/2, y, bounds.width(), bounds.height(), flags, text);

Loading…
Cancel
Save