Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix bug with background color of composer picture
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9640 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Nov 15, 2008
1 parent 527c59f commit f67ac34
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 f67ac34

Please sign in to comment.