Skip to content

Commit

Permalink
[GRASS] hidden option fix
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Sep 3, 2015
1 parent 03916d5 commit bd8b800
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/plugins/grass/qgsgrassmoduleparam.cpp
Expand Up @@ -591,7 +591,11 @@ QString QgsGrassModuleOption::value()
{
QString value;

if ( mControlType == LineEdit )
if ( mHidden )
{
return mAnswer;
}
else if ( mControlType == LineEdit )
{
for ( int i = 0; i < mLineEdits.size(); i++ )
{
Expand Down Expand Up @@ -688,18 +692,12 @@ QStringList QgsGrassModuleOption::options()
{
QStringList list;

if ( mHidden )
{
list.push_back( mKey + "=" + mAnswer );
}
else
QString val = value();
if ( !val.isEmpty() )
{
QString val = value();
if ( !val.isEmpty() )
{
list.push_back( mKey + "=" + val );
}
list.push_back( mKey + "=" + val );
}

return list;
}

Expand Down

0 comments on commit bd8b800

Please sign in to comment.