1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-31 09:05:14 +01:00

Fixed scale item print issue

This commit is contained in:
Martin Tůma 2016-10-23 14:58:24 +02:00
parent e86c19635e
commit 375ef20592

View File

@ -61,7 +61,7 @@ void ScaleItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
for (int i = 0; i <= SEGMENTS; i++) {
QString label = QString::number(_length * i);
br = fm.tightBoundingRect(label);
painter->drawText(_width * i - br.width()/2, br.height(), label);
painter->drawText(_width * i - br.width()/2, br.height() + 1, label);
}
painter->drawText(_width * SEGMENTS + PADDING, SCALE_HEIGHT + PADDING
+ br.height() + fm.descent(), units());