Skip to content

Commit

Permalink
dont add empty field to options, fixes #4929
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Feb 28, 2012
1 parent 5caa403 commit 9a9ab73
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/plugins/grass/qgsgrassmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3227,8 +3227,11 @@ QStringList QgsGrassModuleField::options()
{
QStringList list;

QString opt( mKey + "=" + mFieldComboBox->currentText() );
list.push_back( opt );
if ( !mFieldComboBox->currentText().isEmpty() )
{
QString opt( mKey + "=" + mFieldComboBox->currentText() );
list.push_back( opt );
}

return list;
}
Expand Down Expand Up @@ -3336,8 +3339,11 @@ QStringList QgsGrassModuleSelection::options()
{
QStringList list;

QString opt( mKey + "=" + mLineEdit->text() );
list.push_back( opt );
if ( !mLineEdit->text().isEmpty() )
{
QString opt( mKey + "=" + mLineEdit->text() );
list.push_back( opt );
}

return list;
}
Expand Down

0 comments on commit 9a9ab73

Please sign in to comment.