Skip to content

Commit 6c21076

Browse files
author
mhugent
committed
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
1 parent 8f70b69 commit 6c21076

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core/composer/qgscomposeritem.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ void QgsComposerItem::drawText(QPainter* p, int x, int y, const QString& text, c
529529

530530
p->save();
531531
p->setFont(textFont);
532+
p->setPen(QColor(0, 0, 0)); //draw text always in black
532533
double scaleFactor = 1.0 / FONT_WORKAROUND_SCALE;
533534
p->scale(scaleFactor, scaleFactor);
534535
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
544545

545546
p->save();
546547
p->setFont(textFont);
548+
p->setPen(QColor(0, 0, 0)); //draw text always in black
547549
double scaleFactor = 1.0 / FONT_WORKAROUND_SCALE;
548550
p->scale(scaleFactor, scaleFactor);
549551
p->drawText(scaledRect, Qt::AlignLeft | Qt::AlignTop | Qt::TextWordWrap, text);

0 commit comments

Comments
 (0)