Browse Source

PFD: Avoid copy constructor

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

2
src/ui/PrimaryFlightDisplay.cc

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

Loading…
Cancel
Save