Skip to content

Commit

Permalink
[bugfix] fixed a bug that called populateSymbols multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
Arunmozhi committed Aug 2, 2012
1 parent 24a39fd commit d5f0da5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/core/symbology-ng/qgsstylev2.cpp
Expand Up @@ -1296,7 +1296,7 @@ bool QgsStyleV2::importXML( QString filename )

if( !doc.setContent( &f ) )
{
mErrorString = "Unbale to understand the style file.";
mErrorString = QString( "Unable to understand the style file: %1" ).arg( filename );
QgsDebugMsg( "XML Parsing error" );
f.close();
return false;
Expand All @@ -1306,7 +1306,7 @@ bool QgsStyleV2::importXML( QString filename )
QDomElement docEl = doc.documentElement();
if ( docEl.tagName() != "qgis_style" )
{
mErrorString = "Incoerrect root tag in style: " + docEl.tagName();
mErrorString = "Incorrect root tag in style: " + docEl.tagName();
return false;
}

Expand All @@ -1317,8 +1317,6 @@ bool QgsStyleV2::importXML( QString filename )
return false;
}

QgsStyleV2* defStyle = QgsStyleV2::defaultStyle();

// load symbols
QDomElement symbolsElement = docEl.firstChildElement( "symbols" );
QDomElement e = symbolsElement.firstChildElement();
Expand Down
6 changes: 4 additions & 2 deletions src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp
Expand Up @@ -358,17 +358,19 @@ void QgsStyleV2ExportImportDialog::browse()
return;
}
locationLineEdit->setText( mFileName );
populateStyles( mTempStyle );
}
else if ( type == "official" )
{
// TODO set URL
downloadStyleXML( QUrl( "http://...." ) );
// downloadStyleXML( QUrl( "http://...." ) );
QMessageBox::warning( this, tr( "Invalid Selection" ),
tr( "Sorry! The official QGIS repository has not been implemented. You cannot use this feature now." ) );
}
else
{
downloadStyleXML( QUrl( locationLineEdit->text() ) );
}
populateStyles( mTempStyle );
}

void QgsStyleV2ExportImportDialog::downloadStyleXML( QUrl url )
Expand Down

0 comments on commit d5f0da5

Please sign in to comment.