Skip to content

Commit

Permalink
Fixed reading of frame width from composer items and drawing of frame…
Browse files Browse the repository at this point in the history
… for composer map

git-svn-id: http://svn.osgeo.org/qgis/trunk@11349 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Aug 12, 2009
1 parent ad3028b commit 2811ad8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/composer/qgscomposeritem.cpp
Expand Up @@ -210,7 +210,9 @@ bool QgsComposerItem::_readXML( const QDomElement& itemElem, const QDomDocument&
{
QDomElement frameColorElem = frameColorList.at( 0 ).toElement();
bool redOk, greenOk, blueOk, alphaOk, widthOk;
int penRed, penGreen, penBlue, penAlpha, penWidth;
int penRed, penGreen, penBlue, penAlpha;
double penWidth;

penWidth = itemElem.attribute( "outlineWidth" ).toDouble( &widthOk );
penRed = frameColorElem.attribute( "red" ).toDouble( &redOk );
penGreen = frameColorElem.attribute( "green" ).toDouble( &greenOk );
Expand All @@ -219,7 +221,7 @@ bool QgsComposerItem::_readXML( const QDomElement& itemElem, const QDomDocument&
if ( redOk && greenOk && blueOk && alphaOk && widthOk )
{
QPen framePen( QColor( penRed, penGreen, penBlue, penAlpha ) );
framePen.setWidth( penWidth );
framePen.setWidthF( penWidth );
setPen( framePen );
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/core/composer/qgscomposermap.cpp
Expand Up @@ -242,6 +242,8 @@ void QgsComposerMap::paint( QPainter* painter, const QStyleOptionGraphicsItem* i
mDrawing = false;
}

painter->setClipRect( thisPaintRect , Qt::NoClip);

drawFrame( painter );
if ( isSelected() )
{
Expand Down

0 comments on commit 2811ad8

Please sign in to comment.