Skip to content

Commit 9a9ab73

Browse files
committed
dont add empty field to options, fixes #4929
1 parent 5caa403 commit 9a9ab73

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/plugins/grass/qgsgrassmodule.cpp

+10-4
Original file line numberDiff line numberDiff line change
@@ -3227,8 +3227,11 @@ QStringList QgsGrassModuleField::options()
32273227
{
32283228
QStringList list;
32293229

3230-
QString opt( mKey + "=" + mFieldComboBox->currentText() );
3231-
list.push_back( opt );
3230+
if ( !mFieldComboBox->currentText().isEmpty() )
3231+
{
3232+
QString opt( mKey + "=" + mFieldComboBox->currentText() );
3233+
list.push_back( opt );
3234+
}
32323235

32333236
return list;
32343237
}
@@ -3336,8 +3339,11 @@ QStringList QgsGrassModuleSelection::options()
33363339
{
33373340
QStringList list;
33383341

3339-
QString opt( mKey + "=" + mLineEdit->text() );
3340-
list.push_back( opt );
3342+
if ( !mLineEdit->text().isEmpty() )
3343+
{
3344+
QString opt( mKey + "=" + mLineEdit->text() );
3345+
list.push_back( opt );
3346+
}
33413347

33423348
return list;
33433349
}

0 commit comments

Comments
 (0)