Skip to content

Commit

Permalink
fix bug with background color of composer picture
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@9640 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Nov 15, 2008
1 parent e8cc2c4 commit 4f093a7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/composer/qgscomposerpicture.cpp
Expand Up @@ -101,6 +101,9 @@ void QgsComposerPicture::setPictureFile( const QString& path )
mMode = Unknown;
}

//mImage = QImage(mImage.width(), mImage.height(), QImage::Format_ARGB32 );
//setSceneRect

QFileInfo sourceFileInfo( mSourceFile );
QString sourceFileSuffix = sourceFileInfo.suffix();
if ( sourceFileSuffix.compare( "svg", Qt::CaseInsensitive ) == 0 )
Expand Down Expand Up @@ -133,6 +136,11 @@ void QgsComposerPicture::setPictureFile( const QString& path )
mMode = Unknown;
}
}

if(mMode != Unknown) //make sure we start with a new QImage
{
setSceneRect(QRectF(transform().dx(), transform().dy(), rect().width(), rect().height()));
}
emit settingsChanged();
}

Expand Down

0 comments on commit 4f093a7

Please sign in to comment.