Skip to content

Commit d5f0da5

Browse files
author
Arunmozhi
committedAug 2, 2012
[bugfix] fixed a bug that called populateSymbols multiple times
1 parent 24a39fd commit d5f0da5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
 

‎src/core/symbology-ng/qgsstylev2.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@ bool QgsStyleV2::importXML( QString filename )
12961296

12971297
if( !doc.setContent( &f ) )
12981298
{
1299-
mErrorString = "Unbale to understand the style file.";
1299+
mErrorString = QString( "Unable to understand the style file: %1" ).arg( filename );
13001300
QgsDebugMsg( "XML Parsing error" );
13011301
f.close();
13021302
return false;
@@ -1306,7 +1306,7 @@ bool QgsStyleV2::importXML( QString filename )
13061306
QDomElement docEl = doc.documentElement();
13071307
if ( docEl.tagName() != "qgis_style" )
13081308
{
1309-
mErrorString = "Incoerrect root tag in style: " + docEl.tagName();
1309+
mErrorString = "Incorrect root tag in style: " + docEl.tagName();
13101310
return false;
13111311
}
13121312

@@ -1317,8 +1317,6 @@ bool QgsStyleV2::importXML( QString filename )
13171317
return false;
13181318
}
13191319

1320-
QgsStyleV2* defStyle = QgsStyleV2::defaultStyle();
1321-
13221320
// load symbols
13231321
QDomElement symbolsElement = docEl.firstChildElement( "symbols" );
13241322
QDomElement e = symbolsElement.firstChildElement();

‎src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,17 +358,19 @@ void QgsStyleV2ExportImportDialog::browse()
358358
return;
359359
}
360360
locationLineEdit->setText( mFileName );
361+
populateStyles( mTempStyle );
361362
}
362363
else if ( type == "official" )
363364
{
364365
// TODO set URL
365-
downloadStyleXML( QUrl( "http://...." ) );
366+
// downloadStyleXML( QUrl( "http://...." ) );
367+
QMessageBox::warning( this, tr( "Invalid Selection" ),
368+
tr( "Sorry! The official QGIS repository has not been implemented. You cannot use this feature now." ) );
366369
}
367370
else
368371
{
369372
downloadStyleXML( QUrl( locationLineEdit->text() ) );
370373
}
371-
populateStyles( mTempStyle );
372374
}
373375

374376
void QgsStyleV2ExportImportDialog::downloadStyleXML( QUrl url )

0 commit comments

Comments
 (0)
Please sign in to comment.