mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
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:
parent
ad3028bbe6
commit
2811ad83c0
@ -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() )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user