Skip to content

Commit

Permalink
[GRASS] open full vector to get list of layers on win / G7
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed May 29, 2015
1 parent abe9fd0 commit bb374f0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/providers/grass/qgsgrass.cpp
Expand Up @@ -1014,7 +1014,13 @@ QStringList GRASS_LIB_EXPORT QgsGrass::vectorLayers( const QString& gisdbase, co

G_TRY
{
// TODO: With Vect_open_old_head it crashes on Windows + GRASS 7 in Vect_cidx_get_type_count() when the first
// type is found. Try to open full map on win for now.
#if defined(Q_OS_WIN) && GRASS_VERSION_MAJOR >= 7
level = Vect_open_old( &map, ( char * ) mapName.toUtf8().data(), ( char * ) mapset.toUtf8().data() );
#else
level = Vect_open_old_head( &map, ( char * ) mapName.toUtf8().data(), ( char * ) mapset.toUtf8().data() );
#endif
}
G_CATCH( QgsGrass::Exception &e )
{
Expand Down

0 comments on commit bb374f0

Please sign in to comment.