mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix for font colors changing after polygon layers (ticket 1294)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9265 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
8f70b697fd
commit
6c210764e5
@ -529,6 +529,7 @@ void QgsComposerItem::drawText(QPainter* p, int x, int y, const QString& text, c
|
||||
|
||||
p->save();
|
||||
p->setFont(textFont);
|
||||
p->setPen(QColor(0, 0, 0)); //draw text always in black
|
||||
double scaleFactor = 1.0 / FONT_WORKAROUND_SCALE;
|
||||
p->scale(scaleFactor, scaleFactor);
|
||||
p->drawText(x * FONT_WORKAROUND_SCALE, y * FONT_WORKAROUND_SCALE, text);
|
||||
@ -544,6 +545,7 @@ void QgsComposerItem::drawText(QPainter* p, const QRectF& rect, const QString& t
|
||||
|
||||
p->save();
|
||||
p->setFont(textFont);
|
||||
p->setPen(QColor(0, 0, 0)); //draw text always in black
|
||||
double scaleFactor = 1.0 / FONT_WORKAROUND_SCALE;
|
||||
p->scale(scaleFactor, scaleFactor);
|
||||
p->drawText(scaledRect, Qt::AlignLeft | Qt::AlignTop | Qt::TextWordWrap, text);
|
||||
|
Loading…
x
Reference in New Issue
Block a user