1
0
Fork 0

Fix a compilation issue reported by Dany

This commit is contained in:
James Turner 2018-06-28 12:05:49 +01:00
parent 2573644518
commit c86ed96433
2 changed files with 3 additions and 2 deletions

View file

@ -366,7 +366,8 @@ void BaseDiagram::paintNavaid(QPainter* painter, const FGPositionedRef &pos)
if (drawAsIcon) {
QPixmap pm = iconForPositioned(pos);
QPointF loc = m_viewportTransform.map(project(pos->geod()));
iconRect = pm.rect();
const auto sz = pm.size() / pm.devicePixelRatio();
iconRect = QRect(QPoint(0,0), sz);
iconRect.moveCenter(loc.toPoint());
painter->drawPixmap(iconRect, pm);
}

View file

@ -44,7 +44,7 @@ void PixmapImageItem::setImage(QImage img)
_image = img;
update();
const auto sz = img.size() / img.devicePixelRatioF();
const auto sz = img.size() / img.devicePixelRatio();
setImplicitSize(sz.width(), sz.height());
emit imageChanged();
}