Fixed reading of frame width from composer items and drawing of frame for composer map

git-svn-id: http://svn.osgeo.org/qgis/trunk@11349 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2009-08-12 06:47:32 +00:00
parent ad3028bbe6
commit 2811ad83c0
2 changed files with 6 additions and 2 deletions

View File

@ -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 );
@ -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 );
}
}

View File

@ -242,6 +242,8 @@ void QgsComposerMap::paint( QPainter* painter, const QStyleOptionGraphicsItem* i
mDrawing = false;
}
painter->setClipRect( thisPaintRect , Qt::NoClip);
drawFrame( painter );
if ( isSelected() )
{