Skip to content

Commit bd8b800

Browse files
committed
[GRASS] hidden option fix
1 parent 03916d5 commit bd8b800

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/plugins/grass/qgsgrassmoduleparam.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,11 @@ QString QgsGrassModuleOption::value()
591591
{
592592
QString value;
593593

594-
if ( mControlType == LineEdit )
594+
if ( mHidden )
595+
{
596+
return mAnswer;
597+
}
598+
else if ( mControlType == LineEdit )
595599
{
596600
for ( int i = 0; i < mLineEdits.size(); i++ )
597601
{
@@ -688,18 +692,12 @@ QStringList QgsGrassModuleOption::options()
688692
{
689693
QStringList list;
690694

691-
if ( mHidden )
692-
{
693-
list.push_back( mKey + "=" + mAnswer );
694-
}
695-
else
695+
QString val = value();
696+
if ( !val.isEmpty() )
696697
{
697-
QString val = value();
698-
if ( !val.isEmpty() )
699-
{
700-
list.push_back( mKey + "=" + val );
701-
}
698+
list.push_back( mKey + "=" + val );
702699
}
700+
703701
return list;
704702
}
705703

0 commit comments

Comments
 (0)