Skip to content

Commit 8505295

Browse files
committed
Remove empty wms keyword list from project properties
1 parent ea6802e commit 8505295

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/app/qgsprojectproperties.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,16 @@ void QgsProjectProperties::apply()
572572
QgsProject::instance()->writeEntry( "WMSUrl", "/", mWMSUrlLineEdit->text() );
573573
QgsProject::instance()->writeEntry( "WMSFees", "/", mWMSFees->text() );
574574
QgsProject::instance()->writeEntry( "WMSAccessConstraints", "/", mWMSAccessConstraints->text() );
575-
QgsProject::instance()->writeEntry( "WMSKeywordList", "/", mWMSKeywordList->text().split( "," ) );
575+
//WMS keyword list
576+
QStringList keywordStringList = mWMSKeywordList->text().split( "," );
577+
if ( keywordStringList.size() > 0 )
578+
{
579+
QgsProject::instance()->writeEntry( "WMSKeywordList", "/", mWMSKeywordList->text().split( "," ) );
580+
}
581+
else
582+
{
583+
QgsProject::instance()->removeEntry( "WMSKeywordList", "/" );
584+
}
576585

577586
if ( grpWMSExt->isChecked() )
578587
{

0 commit comments

Comments
 (0)