Skip to content

Commit

Permalink
Fix for font colors changing after polygon layers (ticket 1294)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9265 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Sep 5, 2008
1 parent 8f70b69 commit 6c21076
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/composer/qgscomposeritem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 6c21076

Please sign in to comment.