Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[GRASS] avoid warning dialog in init
  • Loading branch information
blazek committed Sep 23, 2015
1 parent 7dd5302 commit 366331c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/providers/grass/qgsgrass.cpp
Expand Up @@ -293,6 +293,8 @@ QString QgsGrass::shortPath( const QString &path )

bool QgsGrass::init( void )
{
// Do not show warning dialog in this function, it may cause problems in non interactive tests etc.

// Warning!!!
// G_set_error_routine() once called from plugin
// is not valid in provider -> call it always
Expand Down Expand Up @@ -347,7 +349,8 @@ bool QgsGrass::init( void )
}
G_CATCH( QgsGrass::Exception &e )
{
warning( tr( "Problem in GRASS initialization, GRASS provider and plugin will not work" ) + " : " + e.what() );
error_message = tr( "Problem in GRASS initialization, GRASS provider and plugin will not work" ) + " : " + e.what();
QgsDebugMsg( error_message );
nonInitializable = true;
unlock();
return false;
Expand Down Expand Up @@ -549,9 +552,9 @@ bool QgsGrass::init( void )
putEnv( "GRASS_PAGER", pager );
}
}
initialized = 1;
}

initialized = 1;
unlock();
return valid;
}
Expand Down

0 comments on commit 366331c

Please sign in to comment.