Skip to content

Commit bb374f0

Browse files
committedMay 29, 2015
[GRASS] open full vector to get list of layers on win / G7
1 parent abe9fd0 commit bb374f0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/providers/grass/qgsgrass.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,13 @@ QStringList GRASS_LIB_EXPORT QgsGrass::vectorLayers( const QString& gisdbase, co
10141014

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

0 commit comments

Comments
 (0)