Skip to content

Commit

Permalink
[GRASS] fixed input region check
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Oct 16, 2015
1 parent b2ca9d5 commit 6a1f1fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/plugins/grass/qgsgrassmoduleinput.cpp
Expand Up @@ -931,6 +931,7 @@ QgsGrassModuleInput::QgsGrassModuleInput( QgsGrassModule *module,
if ( type() == QgsGrassObject::Raster )
mUsesRegion = true;
}
QgsDebugMsg( QString( "mUsesRegion = %1" ).arg( mUsesRegion ) );
onChanged( "" );
}

Expand Down
4 changes: 1 addition & 3 deletions src/plugins/grass/qgsgrassmoduleoptions.cpp
Expand Up @@ -837,11 +837,9 @@ bool QgsGrassModuleStandardOptions::usesRegion()
for ( int i = 0; i < mParams.size(); i++ )
{
QgsGrassModuleInput *input = dynamic_cast<QgsGrassModuleInput *>( mParams[i] );
if ( input && input->useRegion() )
if ( input && input->usesRegion() )
return true;

/* It only make sense to check input, right?
* Output has no region yet */
QgsGrassModuleOption *option = dynamic_cast<QgsGrassModuleOption *>( mParams[i] );
if ( option && option->usesRegion() )
return true;
Expand Down

0 comments on commit 6a1f1fd

Please sign in to comment.