Skip to content

Commit

Permalink
Disable composer svg cash if dpi is different. Fix for bug #2085
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12097 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Nov 13, 2009
1 parent 323ab6e commit 2e93a04
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/composer/qgscomposerpicture.cpp
Expand Up @@ -57,6 +57,11 @@ void QgsComposerPicture::paint( QPainter* painter, const QStyleOptionGraphicsIte
drawBackground( painter );

int newDpi = ( painter->device()->logicalDpiX() + painter->device()->logicalDpiY() ) / 2;
if ( newDpi != mCachedDpi )
{
mSvgCacheUpToDate = false;
}

if ( mMode != Unknown )
{
double rectPixelWidth = rect().width() * newDpi / 25.4;
Expand Down Expand Up @@ -225,7 +230,7 @@ bool QgsComposerPicture::imageSizeConsideringRotation( double& width, double& he
return false;
}
#if 0
if(!cornerPointOnRotatedAndScaledRect(x4, y4, width, height))
if ( !cornerPointOnRotatedAndScaledRect( x4, y4, width, height ) )
{
return false;
}
Expand Down

0 comments on commit 2e93a04

Please sign in to comment.