From bb374f08a50c2cb7bfde2792327fb69fd06a142a Mon Sep 17 00:00:00 2001 From: Radim Blazek Date: Fri, 29 May 2015 11:35:32 +0200 Subject: [PATCH] [GRASS] open full vector to get list of layers on win / G7 --- src/providers/grass/qgsgrass.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/providers/grass/qgsgrass.cpp b/src/providers/grass/qgsgrass.cpp index 6c2c81342e5..43713590347 100644 --- a/src/providers/grass/qgsgrass.cpp +++ b/src/providers/grass/qgsgrass.cpp @@ -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 ) {