[composer] Ensure url is correctly loaded for html items on project load (fix #9374)

This commit is contained in:
Nyall Dawson 2014-02-01 20:52:45 +11:00
parent a9f4596f4d
commit 9ba28b386f

View File

@ -133,10 +133,18 @@ bool QgsComposerHtml::writeXML( QDomElement& elem, QDomDocument & doc, bool igno
bool QgsComposerHtml::readXML( const QDomElement& itemElem, const QDomDocument& doc, bool ignoreFrames )
{
deleteFrames();
//first create the frames
if ( !_readXML( itemElem, doc, ignoreFrames ) )
{
return false;
}
//then load the set url
QString urlString = itemElem.attribute( "url" );
if ( !urlString.isEmpty() )
{
setUrl( QUrl( urlString ) );
}
return _readXML( itemElem, doc, ignoreFrames );
return true;
}