Skip to content
Permalink
Browse files

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
  • Loading branch information
mhugent
mhugent committed Aug 12, 2009
1 parent ad3028b commit 2811ad83c04858a898328e019decd89b9bc96f7c
Showing with 6 additions and 2 deletions.
  1. +4 −2 src/core/composer/qgscomposeritem.cpp
  2. +2 −0 src/core/composer/qgscomposermap.cpp
@@ -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 );
}
}
@@ -242,6 +242,8 @@ void QgsComposerMap::paint( QPainter* painter, const QStyleOptionGraphicsItem* i
mDrawing = false;
}

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

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

0 comments on commit 2811ad8

Please sign in to comment.
You can’t perform that action at this time.