Skip to content

Commit f67ac34

Browse files
author
mhugent
committed
fix bug with background color of composer picture
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9640 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 527c59f commit f67ac34

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/core/composer/qgscomposerpicture.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ void QgsComposerPicture::setPictureFile( const QString& path )
101101
mMode = Unknown;
102102
}
103103

104+
//mImage = QImage(mImage.width(), mImage.height(), QImage::Format_ARGB32 );
105+
//setSceneRect
106+
104107
QFileInfo sourceFileInfo( mSourceFile );
105108
QString sourceFileSuffix = sourceFileInfo.suffix();
106109
if ( sourceFileSuffix.compare( "svg", Qt::CaseInsensitive ) == 0 )
@@ -133,6 +136,11 @@ void QgsComposerPicture::setPictureFile( const QString& path )
133136
mMode = Unknown;
134137
}
135138
}
139+
140+
if(mMode != Unknown) //make sure we start with a new QImage
141+
{
142+
setSceneRect(QRectF(transform().dx(), transform().dy(), rect().width(), rect().height()));
143+
}
136144
emit settingsChanged();
137145
}
138146

0 commit comments

Comments
 (0)