Skip to content
Permalink
Browse files

[GRASS] fixed input region check

  • Loading branch information
blazek committed Oct 16, 2015
1 parent b2ca9d5 commit 6a1f1fdf0d523dc1bd3adc4843de3e7cfe536027
Showing with 2 additions and 3 deletions.
  1. +1 −0 src/plugins/grass/qgsgrassmoduleinput.cpp
  2. +1 −3 src/plugins/grass/qgsgrassmoduleoptions.cpp
@@ -931,6 +931,7 @@ QgsGrassModuleInput::QgsGrassModuleInput( QgsGrassModule *module,
if ( type() == QgsGrassObject::Raster )
mUsesRegion = true;
}
QgsDebugMsg( QString( "mUsesRegion = %1" ).arg( mUsesRegion ) );
onChanged( "" );
}

@@ -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;

0 comments on commit 6a1f1fd

Please sign in to comment.
You can’t perform that action at this time.