Skip to content
Permalink
Browse files

[bugfix] fixed a bug that called populateSymbols multiple times

  • Loading branch information
tecoholic committed Aug 2, 2012
1 parent 24a39fd commit d5f0da5960eaa59d9d62c7418f37d5ccf9f78e14
Showing with 6 additions and 6 deletions.
  1. +2 −4 src/core/symbology-ng/qgsstylev2.cpp
  2. +4 −2 src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp
@@ -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;
@@ -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;
}

@@ -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();
@@ -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 )

0 comments on commit d5f0da5

Please sign in to comment.
You can’t perform that action at this time.